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

  2. 7654321

  3. 7654321 - 1

  4. Infinite loop

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

First printf() will print 7, then if condition gets true due to non-zero integer and t will decrement and main() call recursively. Again printf() will print 6, then if condition gets true due to non zero integer and t will decrement and main() call recursively and so on. If condition gets false, when value of t will be 0. Hence, output will be 76543210. (The static variable always retains its value)