GATE Exam  >  GATE Questions  >  In the C program given below, find the number... Start Learning for Free
In the C program given below, find the number of tokens present in it.
int main()
{
int l = 5, m= 4;
printf(“abbc ok : %d”, l*m);
printf(“GradeUp”);
return 0;
}
  • a)
    24
  • b)
    32
  • c)
    27
  • d)
    26
Correct answer is option 'B'. Can you explain this answer?
Verified Answer
In the C program given below, find the number of tokens present in it....
Lexical analyzer 1st reads int and finds it valid as a token then proceeds further
So ‘int’,’ main’,’(‘,’)’,’{‘,’int’,’l’,’=’,’5’,’m’,’=’,’4’ then counting the further tokens in the similar way leads to a total count of 32, Hence option b is correct.
View all questions of this test
Most Upvoted Answer
In the C program given below, find the number of tokens present in it....
"There are 12 tokens in the given C program."

Explanation:

The tokens in the program are as follows:

1. int
2. main
3. (
4. )
5. {
6. int
7. l
8. =
9. 5
10. ,
11. m
12. =
13. 4
14. ;
15. printf
16. (
17. "There are 12 tokens in the given C program."
18. )
19. ;
20. }

Therefore, there are a total of 12 tokens in the given C program.
Explore Courses for GATE exam

Similar GATE Doubts

In the C program given below, find the number of tokens present in it.int main(){int l = 5, m= 4;printf(“abbc ok : %d”, l*m);printf(“GradeUp”);return 0;}a)24b)32c)27d)26Correct answer is option 'B'. Can you explain this answer?
Question Description
In the C program given below, find the number of tokens present in it.int main(){int l = 5, m= 4;printf(“abbc ok : %d”, l*m);printf(“GradeUp”);return 0;}a)24b)32c)27d)26Correct answer is option 'B'. Can you explain this answer? for GATE 2024 is part of GATE preparation. The Question and answers have been prepared according to the GATE exam syllabus. Information about In the C program given below, find the number of tokens present in it.int main(){int l = 5, m= 4;printf(“abbc ok : %d”, l*m);printf(“GradeUp”);return 0;}a)24b)32c)27d)26Correct answer is option 'B'. Can you explain this answer? covers all topics & solutions for GATE 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for In the C program given below, find the number of tokens present in it.int main(){int l = 5, m= 4;printf(“abbc ok : %d”, l*m);printf(“GradeUp”);return 0;}a)24b)32c)27d)26Correct answer is option 'B'. Can you explain this answer?.
Solutions for In the C program given below, find the number of tokens present in it.int main(){int l = 5, m= 4;printf(“abbc ok : %d”, l*m);printf(“GradeUp”);return 0;}a)24b)32c)27d)26Correct answer is option 'B'. Can you explain this answer? in English & in Hindi are available as part of our courses for GATE. Download more important topics, notes, lectures and mock test series for GATE Exam by signing up for free.
Here you can find the meaning of In the C program given below, find the number of tokens present in it.int main(){int l = 5, m= 4;printf(“abbc ok : %d”, l*m);printf(“GradeUp”);return 0;}a)24b)32c)27d)26Correct answer is option 'B'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of In the C program given below, find the number of tokens present in it.int main(){int l = 5, m= 4;printf(“abbc ok : %d”, l*m);printf(“GradeUp”);return 0;}a)24b)32c)27d)26Correct answer is option 'B'. Can you explain this answer?, a detailed solution for In the C program given below, find the number of tokens present in it.int main(){int l = 5, m= 4;printf(“abbc ok : %d”, l*m);printf(“GradeUp”);return 0;}a)24b)32c)27d)26Correct answer is option 'B'. Can you explain this answer? has been provided alongside types of In the C program given below, find the number of tokens present in it.int main(){int l = 5, m= 4;printf(“abbc ok : %d”, l*m);printf(“GradeUp”);return 0;}a)24b)32c)27d)26Correct answer is option 'B'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice In the C program given below, find the number of tokens present in it.int main(){int l = 5, m= 4;printf(“abbc ok : %d”, l*m);printf(“GradeUp”);return 0;}a)24b)32c)27d)26Correct answer is option 'B'. Can you explain this answer? tests, examples and also practice GATE tests.
Explore Courses for GATE exam
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev