Computer Knowledge

Programming Fundamentals

2,381 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
  1. It specifies and converts the byte code into executable format.

  2. It is responsible for the runtime type safety and assembly verification.

  3. It provides the assembly metadata for any illegal accesses and handles violations appropriately.

  4. It handles reading the metadata by reflection.

  5. Options 3 and 4

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

JIT compilation does not have such reading of metadata information.

Multiple choice
  1. 29

  2. 24

  3. 23

  4. 20

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

Instruction fetch/decode: 2 cycles per word. Memory transfer: 3 cycles. ADD: 1 cycle. MOV R1,5000 (2 words): 4 cycles + 3 (mem) = 7. MOV R2,(R1) (1 word): 2 cycles + 3 (mem) = 5. ADD R2,R3 (1 word): 2 cycles + 1 = 3. MOV 6000,R2 (2 words): 4 cycles + 3 (mem) = 7. HALT (1 word): 2 cycles. Total: 7+5+3+7+2 = 24.

Multiple choice
  1. True

  2. False

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

A union definition itself is just a template or a type declaration; it does not allocate memory until a variable of that union type is instantiated.