Quiz Space

Introduction to C Programming · Qualifier · 13 Apr 2025 · January 2025 term

Question 8: Which of the following statements correctly declares and …

Question 8

+3 marksOne correct option

Which of the following statements correctly declares and initializes an integer variable named age in C?

  1. A

    int age = 25;

  2. B

    age = 25;

  3. C

    int *age = 25;

  4. D

    age = int(25);

Show answer

Correct answer

  • A

    int age = 25;

Question 8 of 16 in the IIT Madras BS Introduction to C Programming (Intro to C Programming) Qualifier paper sat on 13 Apr 2025, in the January 2025 term (IIT M ES REATTEMPT AN EXAM QEQ1 13 Apr 2025). It carries 3 marks.

This question was also asked in

More questions from this paper

  1. Q1The main purpose of cache memory is to:
  2. Q2Identify the option that arranges the following memory types in descending order of size (from largest to smallest).
  3. Q3What is the minimum number of bits required for binary representation of (1912)10?
  4. Q4What is the decimal equivalents for the binary number 10011011?
  5. Q5What is the sum of the hexadecimal numbers AB, 3C and 4F as a decimal number?
  6. Q6The 16-bit binary representation of decimal number “-256” in 2's complement notation is.
  7. Q7Consider the following code snippet. What will be the value of x, y and z after executing the given code snippet?
  8. Q9Shree is writing a program to calculate the product of the first 10 multiples of 4. He has written a code, but one stat…
  9. Q10Which of the following special symbols is allowed in a variable name?
  10. Q11What will be the output if the user enters x = 4 and y = 10 in the following program?
  11. Q12Consider the following equation: If all the variables are float, which of the following is a correct way to write the g…
  12. Q13Consider the computations given below using the generalized memory model.\ M[0] ← 7\ M[1] ← 5\ M[1] ← M[1] M[1]\ M[0] ←…
  13. Q14Consider the computations given below using the generalized memory model. 1. R[0] \leftarrow 5 R[1] \leftarrow 3 R[2] \…
  14. Q15Consider the below code segment What will be the output of the above program?
  15. Q16Consider the C program given below. How many times “Hello” gets printed?