Computer Knowledge

Programming Output Evaluation

1,721 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. printf(“Hello”);

  2. Printf“Hello”;

  3. System.out.printf(“Hello”);

  4. None of the above

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

We can also use the printf() statement in Java like C language. The correct way to display using printf() method is System.out.printf(“Hello”);

Multiple choice business maths linear programming problems structure of linear programming model linear programming problem operations research

Find the output of the program given below if$ x = 48$
and $y = 60$
10  $ READ x, y$
20  $Let x = x/3$
30  $ Let y = x + y + 8$
40  $ z = \dfrac y4$
50  $PRINT z$
60  $End$

  1. $21$
  2. $22$
  3. $23$
  4. $24$
Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

After the step $ 10 $ READ $ x, y $, the value of $ x = 48, y = 60 $

After the step $ 20 $ Let $ x = \frac {x}{3} $, the value of $ x = \frac {48}{3} = 16 , y = 60 $

After the step $ 30 $ Let $ y = x +y + 8 $, the value of $ x = 16, y = 16 + 60 + 8 = 84   $

After the step $ 40 $ Let $ z = \frac {y}{4} $, the value of $ x = \frac {84}{4} = 21   $

Hence $ z = 21 $ is the final output printed.

Multiple choice
  1. Allows you to save to the file

  2. Allows you to read a single line from the file

  3. Allows you to read the entire file

  4. Allows you to save a single line to the file

Reveal answer Fill a bubble to check yourself
C Correct answer