Open In App
Related Articles

C | Misc | Question 7

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

The number of tokens in the following C statement is

printf("HELLO WORLD");
(A)

3

(B)

5

(C)

9

(D)

8



Answer: (B)

Explanation:

In a C source program, the basic element recognized by the compiler is the “token.” A token is source-program text that the compiler does not break down into component elements. There are 6 types of C tokens : identifiers, keywords, constants, operators, string literals and other separators. There are total 5 tokens in the above printf statement. Below are tokens in above program.

printf
(
"HELLO WORLD"
)
;


Quiz of this Question
Please comment below if you find anything wrong in the above post

Last Updated : 01 Sep, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads