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. To exit from the program.

  2. To exit from the loop.

  3. To end the current iteration and jump to the next iteration.

  4. None of these

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

Break statement is used for exiting from the loop, hence this is the answer.

Multiple choice
  1. To make the code easier to read.

  2. To indicate the start of a new line.

  3. They are not used.

  4. To maintain order of the lines at compile time.

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

C source code is a plain text file. Line numbers are not part of the syntax and are not required by the compiler; they are only added by text editors for the convenience of the programmer.

Multiple choice
  1. inserting a '0' is user data stream to differentiate it with a flag

  2. inserting a '0' in flag stream to avoid ambiguity

  3. appending a nibble to the flag sequence

  4. appending a nibble to the user data stream

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

Bit stuffing (often called bit stuffing, not snuffing) is the process of inserting a bit (usually a 0) into a data stream to prevent a sequence of bits from being misinterpreted as a control flag.