ISRO | ISRO CS 2020 | Question 62
The number of tokens in the following C code segment is
switch(inputvalue) { case 1 : b = c * d; break; default : b = b++; break; }
(A) 27
(B) 29
(C) 26
(D) 24
Answer: (C)
Explanation:
switch⏐(⏐inputvalue⏐)⏐ {⏐ case⏐1⏐:⏐ b⏐ = ⏐c⏐*⏐d⏐;⏐ break⏐;⏐ default⏐:⏐ b⏐ = ⏐b⏐++⏐;⏐ break⏐;⏐ }⏐
Total 26 tokens in the program.
So option (c) is correct.
Quiz of this Question
Please Login to comment...