Skip to content
Related Articles
Get the best out of our app
GFG App
Open App
geeksforgeeks
Browser
Continue

Related Articles

ISRO | ISRO CS 2020 | Question 62

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

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

My Personal Notes arrow_drop_up
Last Updated : 09 Sep, 2020
Like Article
Save Article
Similar Reads