Computer Science, asked by tushernick01400, 6 months ago

printf(“%d + %d = %d”, a, b, c);
How many tokens are in the statement?

Answers

Answered by innocentyashmi1
0

Answer:

Sorry didn't know bro.

Please mark as brainlist and follow me please please ❤️❤️❤️

Answered by sohail020803
1

Answer:

here is answer

Explanation:

The number of tokens in the following C statement. 

printf("i = %d, &i = %x", i, &i);is

(a) 3   (b) 26   (c) 10    (d) 21

Ans: option (c)

Explanation:

The smallest individual units are known as C Tokens. The keywords, identifiers, constants, string literals, and operators described in this section are examples of tokens. Punctuation characters such as brackets ([ ]), braces ({ }), parentheses ( ( ) ), and commas (,) are also tokens.

Example:

printf("Hello, World! \n");

The tokens for the above statement are:

1) printf

2) (

3) "Hello, World! \n"

4) )

5) ;

So there are 5 tokens

printf("i = %d, &i = %x", i, &i);

10 Tokens are:

1) printf

2) (

3) "i = %d, &i = %x"

4) ,

5) i

6) ,

7) &

8) i

9) )

10);

may some what correct

Similar questions