The number of tokens in the following C statement is printf("i=%d, &i=%x",…
2015
The number of tokens in the following C statement is printf("i=%d, &i=%x", i,&i);
Answer: C. 10 — The C statement printf("i=%d, &i=%x", i,&i); contains exactly 10 tokens. These are the function identifier printf, opening and closing parentheses, a single…
- A.
13
- B.
6
- C.
10
- D.
9
Attempted by 344 students.
Show answer & explanation
Correct answer: C
The C statement printf("i=%d, &i=%x", i,&i); contains exactly 10 tokens. These are the function identifier printf, opening and closing parentheses, a single string literal, two commas, two variable identifiers i, the address operator &, and the final semicolon.
A video solution is available for this question — log in and enroll to watch it.
Explore the full course: Iocl Engineers Officers Grade A Paper 2
Loading lesson…