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. D

  2. A

  3. B

  4. C

  5. E

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

It is the right answer. According to the given operations, first push A, then B and C. After that, perform the pop operation two times. This will delete B and C. Now again, push D and E, at last perform the pop operation, which deletes the last inserted item E. Now, the value of the top of the stack is D.

Multiple choice
  1. This is an attempt to delete an element from the already empty stack.

  2. This is an attempt to remove an element from the top of the stack.

  3. This is an attempt to insert an element to the top of the stack.

  4. This is an attempt to delete an element from the already full stack.

  5. None of the above

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

This is true about stack underflow.

Multiple choice
  1. entry controlled loop

  2. exit controlled loop

  3. exit-entry controlled loop

  4. entry-exit controlled loop

  5. output controlled loop

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

As it controls entry and if entry condition is true, then you can go into the loop otherwise you cannot enter into the loop.

Multiple choice
  1. entry controlled loop

  2. exit controlled loop

  3. input controlled loop

  4. output controlled loop

  5. entry-exit controlled loop

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

It is called exit controlled loop because the body of loop is executed at least once if condition is false.