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. Execution Interface Block

  2. Error Interface block

  3. External Interval block

  4. Exit interface block

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

EIB stands for Execution Interface Block in CICS. It is a control block that contains information about the currently executing task and is accessible to CICS application programs. The EIB provides data about the transaction status, terminal ID, cursor position, and response codes, allowing programs to interact with the CICS environment.

Multiple choice technology
  1. RBDMIDOC

  2. SMD

  3. RBDCPCLR

  4. SLD

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

Change Pointers in SAP are managed by the Shared Master Data (SMD) mechanism, which tracks changes to master data objects and triggers distribution to subscribed systems. SMD maintains the change pointer tables and controls the change pointer writing process. RBDMIDOC is a transaction for sending IDocs, RBDCPCLR deletes old change pointers, and SLD is SAP Landscape Directory.

Multiple choice technology programming languages
  1. Sequence Output Stream

  2. Print Stream

  3. None of the above

  4. 1 and 2

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

There is no direct 'SequenceOutputStream' class in Java that corresponds to SequenceInputStream. SequenceInputStream reads sequentially from multiple input streams, but there's no symmetric output stream class. PrintStream is a different concept (wraps an OutputStream with print methods). Therefore 'None of the above' is correct, but this is a poorly formed MC-2 question with only one correct answer.

Multiple choice technology testing
  1. lr_set_debug_message

  2. lr_debug_message

  3. lr_extended_Log

  4. lr_set_extended_log

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

In LoadRunner, the lr_set_debug_message() function is used to enable or disable debug message generation during test execution. This allows you to control debug output dynamically at runtime without restarting the test.

Multiple choice technology testing
  1. lr_continue_on_error (0) for start and lr_continue_on_error (1) to end

  2. lr_continue_on_error (1) for start and lr_continue_on_error (0) to end

  3. lr_continue_on_error (1) for start and lr_continue_on_error (1) to end

  4. lr_continue_on_error (0) for start and lr_continue_on_error (0) to end

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

lr_continue_on_error(0) starts the continue-on-error mode, allowing the script to run even if errors occur. lr_continue_on_error(1) ends the continue-on-error mode and returns to default error handling. Option A correctly shows 0 for start and 1 for end. Using 0 for both would leave it enabled indefinitely.

Multiple choice technology programming languages
  1. char ** (* p) [12][12] = array;

  2. char ***** p = array;

  3. char * (* p) [12][12][12] = array;

  4. const char ** p [12][12][12] = array;

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

To solve this question, the user needs to be familiar with C/C++ syntax and the concept of pointers.

A. char ** (* p) [12][12] = array;

This option is valid. p is a pointer to a 3D array of char pointers. It is initialized to point to the first element of the array using the assignment operator =.

B. char ***** p = array;

This option is not valid. p is a pointer to a pointer to a pointer to a pointer to a pointer to a char, which is not compatible with the type of array.

C. char * (* p) [12][12][12] = array;

This option is not valid. p is a pointer to a 4D array of char pointers, which is not compatible with the type of array.

D. const char ** p [12][12][12] = array;

This option is not valid. p is a 3D array of const char pointers, which is not compatible with the type of array.

Therefore, the only valid option is:

The Answer is: A

Multiple choice technology mainframe
  1. EXIT

  2. STOP

  3. STOP RUN

  4. None of the above

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

In COBOL, 'STOP RUN' is the statement used to terminate program execution and return control to the operating system. 'EXIT' is not a valid COBOL verb for program termination, and 'STOP' alone is incomplete. The 'STOP RUN' statement is the standard method to end a COBOL program gracefully.

Multiple choice technology mainframe
  1. Contents of A will be moved to B

  2. Contents of B will be moved to A

  3. Statement will give an error

  4. None

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

The SET statement in COBOL sets index names or data items to specific values. 'SET A TO B' sets A to the value contained in B, moving B's contents to A. This is the standard direction of assignment in SET statements. The statement is syntactically correct and doesn't produce an error when A and B are properly defined data items.

Multiple choice technology mainframe
  1. All the woking staorage variables in ProgramB will be initialized when the Program B execution is completed.

  2. Nothing will happen. It is just coded to indicate the end of CALL statement.

  3. Areas A, B and C will be initialized when the Program B execution is completed.

  4. None of the above

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

In COBOL, END-CALL is an optional scope terminator that simply marks the end of a CALL statement. It has no special functional effect on the called program or its working storage. The CALL statement executes normally regardless of whether END-CALL is present.

Multiple choice technology mainframe
  1. The Control will come back to Program A.

  2. The control will NOT come back to Program A and Program B will terminates immediately at the STOP RUN Statement.

  3. Program B abends abnormally.

  4. Infinite Loop

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

When STOP RUN is executed in any program in the call chain, it immediately terminates the entire run unit and returns control to the operating system. Control does NOT return to the calling program (Program A). This is different from GOBACK or EXIT PROGRAM, which return control to the caller.

Multiple choice technology platforms and products
  1. Syntax Error

  2. Symantic Error

  3. Logical Error

  4. Internal Error

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

Compilers detect syntax errors, which are violations of the programming language's grammatical rules (keywords, punctuation, statement structure). Semantic errors involve incorrect logic or meaning, logical errors produce wrong results without breaking rules, and internal errors are compiler defects.

Multiple choice technology programming languages
  1. TRUE

  2. True using pointer

  3. FALSE

  4. Some times true, some times false.

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

Properties in Delphi cannot be passed as var parameters because var parameters require the actual variable address, but properties may not have backing storage (they could be computed or virtual). You must use a temporary local variable if you need to pass a property's value by reference. This is a language design constraint, not a limitation you can bypass with pointers.