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 programming languages
  1. EXEC

  2. SYSABEND

  3. JOBLIB

  4. SYSPRINT

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

JOBLIB is a job-level statement that defines a private library for the entire job and cannot appear within a PROC. PROCs can contain EXEC statements (for steps), DD statements (like SYSPRINT for output, SYSABEND forabend dumps), and other step-level elements. JOBLIB must precede the first EXEC statement in a job.

Multiple choice technology programming languages
  1. TYPRUN=COMPILE

  2. TYPRUN=ERRFREE

  3. TYPRUN=HOLD

  4. TYPRUN=SCAN

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

TYPRUN=SCAN performs syntax checking without executing the job, useful for validating JCL before production submission. COMPILE compiles and executes the program. HOLD holds the job in the input queue without execution. ERRFREE is not a valid TYPRUN parameter value.

Multiple choice technology programming languages
  1. open cursor; ---some statements close;

  2. open cursor; fetch into variables; ---some statements close cursor;

  3. open cursor; fetch into variables; ---some statements close;

  4. All of the above

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

The correct structure of an explicit cursor is: OPEN cursor, FETCH cursor INTO variables, process the data, then CLOSE cursor. Option B correctly shows this complete lifecycle with FETCH statement included.

Multiple choice technology testing
  1. A. ByVal

  2. B. ByRef

  3. C. ByArg

  4. D. ByRes

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

Quick Test Professional (QTP) passes arguments to procedures by reference (ByRef) by default, meaning the procedure receives a reference to the original variable. This allows the procedure to modify the original variable's value, which is efficient for memory usage but requires awareness of potential side effects.

Multiple choice technology mainframe
  1. DFHEIBDK, DFHCOMMAREA

  2. DFHEIBLK, DFHCOMNAREA

  3. DFHEEBLK, DFHCOMMAREA

  4. DFHEIBLK, DFHCOMMAREA

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

The CICS translator inserts the EXEC Interface Block (DFHEIBLK) and the Communication Area (DFHCOMMAREA) into the Linkage Section of a COBOL program to handle CICS system communication and data passing.

Multiple choice technology programming languages
  1. It offers option of sharing local variables and better run time efficiency

  2. Provides benefit of automatic recompilation

  3. It is processed during translation and compilation and does not impose any restrictions on output buffering

  4. none of the above

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

The JSP include directive (<%@ include file="..." %>) merges the content of the target file into the calling page during translation. This allows sharing of local variables and offers better runtime efficiency compared to dynamic inclusion.

Multiple choice technology programming languages
  1. return

  2. break

  3. goto

  4. continue

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

Java has 'goto' as a reserved keyword but it is not implemented as a branching statement - it has no functionality. 'return', 'break', and 'continue' are all valid branching statements that control flow. The question asks which is NOT a branching statement, making 'goto' (option C) the correct answer despite being syntactically reserved but unusable.