1 votes 1 votes Find no of tokens in below program. #include<stdio.h> main() { int I; int *pi = &I; //parent pointer scanf("%d",pi); printf("%d\n", I+5); } Compiler Design compiler-tokenization lexical-analysis + – sagar27 asked Sep 21, 2018 sagar27 5.2k views answer comment Share Follow See all 11 Comments See all 11 11 Comments reply Show 8 previous comments suneetha commented Oct 12, 2018 reply Follow Share i am getting total num of tokens as 32 0 votes 0 votes Aryanishu2000 commented Mar 29, 2020 reply Follow Share References to printf and scanf are actually resolved by the linker by providing the object code for printf and scanf and other library functions. In the preprocessing phase only function prototype are included in source code . So the actual resolving done by linker . That linking again of two types-- Static linking Dynamic linking 0 votes 0 votes Sanandan commented Oct 3, 2020 reply Follow Share Total number of tokens are 31 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes statement # of tokens #include<stdio.h> 0(zero) main() 3 { 1 int I; 3 int *pi = &I; //parent pointer 7 scanf("%d",pi); 7 printf("%d\n", I+5); 9 } 1 Total 31 sudharshan answered Feb 1, 2019 sudharshan comment Share Follow See 1 comment See all 1 1 comment reply PratikDey0316 commented Nov 3, 2020 reply Follow Share @sudharshan We can't say that #include<stdio.h> will have 0 tokens because in the preprocessor stage this header would be expanded to its actual content. And the number of tokens would be huge !!! 0 votes 0 votes Please log in or register to add a comment.