Quiz Space

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

Question 12: What is the value of the integer variable result after e…

Question 12

+2 marksNumerical answer

What is the value of the integer variable result after executing the following C statement?

Show answer

Correct answer: 14

Question 12 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. Q13Which of the following CANNOT be used as valid variable names in C?
  13. Q14Which of the following statements about C's logical operators '\&\&' (AND) and '||' (OR) are correct, specifically rega…
  14. Q15Consider the following C program: Which of the following statements about the output are true?
  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…