Computer Knowledge

Programming Output Evaluation

1,953 Questions

Programming output evaluation tests the ability to trace code execution in languages like C, Java, and SAS. It focuses on arrays, loops, pointers, and data type conversions. These technical questions are standard in computer knowledge sections for IT officer and bank exams.

Java string bufferC language pointersLoop execution outputsData type conversionsMacro variable evaluation

Programming Output Evaluation Questions

Multiple choice
  1. an error message

  2. 0

  3. garbage

  4. 1

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

The sizeof operator returns the size of the string literal, including the null terminator character ('\0'). An empty string "" contains only the null terminator, so its size is 1.