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. DFHEIBDK, DFHCOMMAREA

  2. DFHEIBLK, DFHCOMNAREA

  3. DFHEEBLK, DFHCOMMAREA

  4. DFHEIBLK, DFHCOMMAREA

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

When a CICS program is compiled, the preprocessor includes DFHEIBLK (the CICS Execute Interface Block) and DFHCOMMAREA (the communication area definition) to provide the necessary CICS interface structures. Options A, B, and C have typos in the field names (DFHEIBDK, DFHCOMNAREA, DFHEEBLK).

Multiple choice technology programming languages
  1. Type N

  2. Type C

  3. Type F

  4. Type P

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

This appears to be a SAP ABAP question. In ABAP, Type F (floating-point) cannot be used to define parameters - it's not allowed for parameter definitions due to precision and rounding issues. Types N (numeric text), C (character), and P (packed number) are valid parameter types.

Multiple choice technology programming languages
  1. Positional, Keyword

  2. Keyword, Control

  3. Dynamic, Static

  4. Named, Dynamic

  5. None of the above

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

DD (Data Definition) statements in JCL have two parameter types: positional parameters (which must appear in a specific order, like dataset name) and keyword parameters (identified by keywords like DISP, SPACE, UNIT, etc., which can appear in any order). Positional parameters come first, followed by keyword parameters.

Multiple choice technology web technology
  1. Unmatched bracket in for statement

  2. Flush attribute must be false

  3. Keyword 'file' should be used instead of 'page' in the <jsp:forward/> action

  4. Actions cannot be used within scriptlet blocks

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

JSP actions (like ) are XML-based tags and cannot be embedded within scriptlet blocks (<% %>). Scriptlets contain Java code, while actions are processed by the JSP container at a different phase. To use actions conditionally, you would need to structure the code differently or use scriptlets exclusively.

Multiple choice technology platforms and products
  1. sendevent -E DELETE_GLOBAL -G "today=DELETE"

  2. sendevent -E SET_GLOBAL -G "today=NULL"

  3. sendevent -E SET_GLOBAL -G "today=DELETE"

  4. sendevent -DELETE "today"

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

To delete a global variable in AutoSys, use sendevent -E SET_GLOBAL with the variable name set to DELETE. Option A incorrectly uses DELETE_GLOBAL which is not a valid event. Option B sets the variable to NULL rather than deleting it. Option D has invalid syntax.

Multiple choice technology programming languages
  1. Step will not execute

  2. Step will abend

  3. Step will execute

  4. S0C7

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

In JCL, the COND parameter specifies a condition that, if true, causes the step to be bypassed (not executed). This allows conditional execution based on return codes from previous steps. Option B (abend) would mean abnormal termination, not skipping. Option C (execute) is the opposite of what COND does. S0C7 (option D) is a specific system abend code for data exception, unrelated to COND logic.

Multiple choice technology operating systems
  1. while until

  2. until, while

  3. repeat, while

  4. None

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

The while loop continues executing as long as its condition returns exit status 0 (true), whereas the until loop executes until its condition becomes 0 (true), meaning it runs while the condition returns non-zero (false). This is the inverse behavior.

Multiple choice technology operating systems
  1. function_name() {command-list }

  2. function_name ( ) { }

  3. function name (command list ) {

  4. None

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

The correct bash function syntax is function_name() { commands; }. Option B has a space before () which is invalid. Option C has incorrect syntax with parentheses around function name and missing braces. Option D is incorrect as option A is valid.