Quiz Space

Programming in C · Quiz 1 · 19 Jul 2026 · May 2026 term

Question 15: Consider the following C program: Which of the following…

Question 15

+2 marksOne or more correct options

Consider the following C program:

Which of the following statements about the output are true?

Select all that apply.

  1. A

    If the input is x = 5, y = 6, the output is R

  2. B

    If the input is x = -1, y = 15, the output is V

  3. C

    If the input is x = 0, y = 12, the output is U

  4. D

    If the input is x = 1, y = 7, the output is R

  5. E

    If the input is x = 0, y = 5, the output is U

Show answer

Correct answers

  • A

    If the input is x = 5, y = 6, the output is R

  • B

    If the input is x = -1, y = 15, the output is V

  • E

    If the input is x = 0, y = 5, the output is U

Question 15 of 17 in the IIT Madras BS Programming in C (Programming in C) Quiz 1 paper sat on 19 Jul 2026, in the May 2026 term (Programming in C 16 Jul 26). It carries 2 marks.

More questions from this paper

  1. Q1Which of the following best characterizes the C programming language?
  2. Q2What is the decimal equivalent of the hexadecimal number 3D?
  3. Q3What is the range of integer values that can be represented by an 8-bit signed integer using two's complement conventio…
  4. Q4What is the purpose of the Program Counter (PC) in a CPU?
  5. Q5Consider the computations given below using the generalized memory model. M[0] ← x1. M[1] ← y2. M[2] ← M[0] – M[1]3. M[…
  6. Q6What will be the output of the following code?
  7. Q7What will be the output of the following code?
  8. Q8Trace the computation of the following C program fragment: What are the final values of a, b, and c?
  9. Q9Consider the following C code. What will be the output?
  10. Q10Consider the nested ternary expression: What is the value of b after execution?
  11. Q11What will be the output of the following code?
  12. Q12What is the value of the integer variable result after executing the following C statement?
  13. Q13Which of the following CANNOT be used as valid variable names in C?
  14. Q14Which of the following statements about C's logical operators '\&\&' (AND) and '||' (OR) are correct, specifically rega…
  15. Q16Consider the following generalized computation:\ Step 1: R0 ← M[0]\ Step 2: R1 ← M[1]\ Step 3: R3 ← R0 MOD 2\ Step 4: I…
  16. Q17Consider the following assembly program (anything after ; is a comment). If initially n=6, what will be the final value…