Computer Knowledge

Programming Fundamentals

2,611 Questions

Programming fundamentals form the core logic of software development and computer science. This includes variable declarations, pointer assignments, loop iterations, and exception handling. These technical topics are regularly tested in computer knowledge and IT officer competitive examinations.

Variables and arraysPointer assignmentsLoop iterationsException handling blocksCompile time errorsFunction references

Programming Fundamentals Questions

Multiple choice technology mainframe
  1. variables with abend codes

  2. only error codes

  3. variables with error code

  4. none of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Error screens in Java applications need to display both the variables involved and the error code to enable debugging and troubleshooting. Variables provide context about what failed, while error codes identify the specific failure type.

Multiple choice technology mainframe
  1. DIOAPLCK

  2. DIOJCLCK

  3. JCLUTLCK

  4. DIOAPLCHK

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In specific mainframe training environments, DIOAPLCK is the recognized JCL checker utility used to validate JCL syntax and identify errors before execution. The other options are invalid variations or distractors of this specific command name used in the utility context.

Multiple choice technology mainframe
  1. EXIT

  2. 1000-EXIT

  3. 1000_EXIT

  4. BOTH 1 and 2

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

1000-EXIT is the standard paragraph name for EXIT paragraphs in COBOL programs. The numbering convention (1000) places it at the end, and the hyphenated format is standard COBOL paragraph naming.

Multiple choice technology programming languages
  1. enumeration

  2. iteration

  3. culmination

  4. pass through

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Each pass through a loop is called an iteration. This is standard programming terminology used across all languages. Enumeration refers to listing items, culmination is an ending point, and 'pass through' is not the technical term.

Multiple choice technology programming languages
  1. the next iteration of the loop

  2. the first statement after the loop

  3. the statement following the continue statement

  4. the return 0; statement

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

A continue statement causes the program to skip the remaining statements in the current iteration and jump to the next iteration of the loop. It does not exit the loop (that would be break), and it does not skip to the statement following continue.

Multiple choice technology programming languages
  1. parentheses ( )

  2. braces { }

  3. brackets [ ]

  4. arrows < >

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In C/C++/Java, when a for loop contains multiple statements in its body, you must enclose them in curly braces { } to form a block. Without braces, only the first statement would be part of the loop, and the rest would execute once after the loop completes.

Multiple choice technology programming languages
  1. enumeration

  2. iteration

  3. culmination

  4. pass through

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In computer programming, a single execution of the set of instructions contained within a loop is universally defined as an iteration. Terms like enumeration, culmination, or pass through do not serve as the standard computer science definition.

Multiple choice technology programming languages
  1. the return 0; statement

  2. the first statement after the loop

  3. the statement following the continue statement

  4. the next iteration of the loop

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

When a continue statement is encountered within a loop, it immediately skips the remaining statements in the current iteration and jumps to the next iteration of the loop. Unlike break, which exits the loop entirely, continue just restarts the loop cycle.

Multiple choice technology mainframe
  1. DIOJCLCK

  2. DIOAPLCK

  3. JCLUTLCK

  4. DIOAPLCHK

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The claimed answer B (DIOAPLCK) appears to be an organization-specific JCL checker utility. Without domain knowledge of this specific organization's toolset, we rely on the marked answer. The other options (DIOJCLCK, JCLUTLCK, DIOAPLCHK) are likely distractors or similar-sounding utilities.

Multiple choice technology mainframe
  1. 1000-EXIT

  2. EXIT

  3. 1000_EXIT

  4. BOTH a and b

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In COBOL and similar structured programming languages, paragraph names follow a specific format: numeric identifier followed by a descriptive name, with the separator being a hyphen. 1000-EXIT follows this convention correctly. Option B (EXIT) lacks the required numeric prefix, and Option C uses an underscore which is non-standard.

Multiple choice technology
  1. main task only

  2. any task in rule flow

  3. rule tasks and functions

  4. sub flow task

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Initial actions in IBM ODM rule flow can be defined in any task, not just the main task, allowing flexible setup logic throughout the flow. These actions execute before the main task logic. Sub flow tasks and rule tasks/functions are not the correct scope for defining initial actions.

Multiple choice technology
  1. can use automatic variables

  2. can use standard rule properties

  3. cannot use rule set parameters

  4. cannot use custom rule

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In runtime rule selection expressions, developers can use standard rule properties like effective date, expiration date, and priority to filter rules. Automatic variables are for rule execution, not selection. Rule set parameters and custom rules can be used, contrary to what options C and D suggest.

Multiple choice technology
  1. rule subsumptions

  2. rule with no actions

  3. infinitely looping

  4. self inconsistent

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The rule consistency checker in IBM ODM cannot detect infinitely looping rules because infinite loops are a runtime behavior that depends on input data and execution context. It can detect rule subsumptions, rules with no actions, and self-inconsistent rules through static analysis.