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. It generates symbol table and generates code afterwards.

  2. It allows labels, which can be defined after it is used.

  3. It does not allow defining a function after it has been called in the program.

  4. It allows a forward definition of a symbol or identifier.

  5. None of the above

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

All the functions has to be defined before they are used or called.

Multiple choice
  1. Compiler

  2. Program, since queue entries are overflowed

  3. Stack overflow

  4. Number of stacks assigned to this program crossed the maximum limit assigned to compiler

  5. Symbol table over flow

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

Every call to a recursive program creates a local stack of desired length. But if recursive function calls itself with in the function then another stack is crated for second call and this goes on as long as the recursive function call itself without completing it self. In the given prohram , the condition to close the recursion is not set and so the function is called endlessly. This situation has caused the error of insufficient memory, since no more space is available for new stack.

Multiple choice
  1. Float

  2. Interface

  3. String

  4. Unsigned

  5. None of these

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

An interface in the Java programming language is an abstract type that is used to specify an interface (in the generic sense of the term) that classes must implement.

Multiple choice
  1. Single error

  2. Arithmetic error

  3. Control logic error

  4. Comparison error

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

Common module errors in programming include arithmetic errors (calculation mistakes), control logic errors (flawed conditionals or loops), and comparison errors (incorrect relational operations). 'Single error' is not a standard category of programming errors - it's not a recognized type of module error.

Multiple choice
  1. the prompt to print in the next available space

  2. a line to be skipped in the output

  3. a question mark to appear on the screen at the end of the statement

  4. an error to occur

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

A semicolon after the prompt suppresses the automatic newline and causes a question mark to appear at the end of the prompt, signaling that input is expected.