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
  1. Immutable

  2. Mutable

  3. Both 1 and 2

  4. None of these

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

An immutable object or file is one whose state cannot be modified after it is created. This is a common concept in functional programming and distributed file systems.

Multiple choice
  1. arguments by reference

  2. arguments by value

  3. arguments by pointer

  4. arguments by variable

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

Java always passes arguments by value. For objects, the value passed is the reference to the object.

Multiple choice
  1. fetching

  2. executing

  3. both 1 and 2

  4. none of these

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

The control unit is responsible for the instruction cycle, which includes both fetching instructions from memory and coordinating their execution by other parts of the system.

Multiple choice
  1. compile time

  2. run time

  3. execution time

  4. none of these

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

Static variables or global variables (often referred to as S in such contexts) are allocated memory at compile time.

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.