retagged by
3,601 views
2 votes
2 votes

 

retagged by

2 Answers

1 votes
1 votes

It should be None of these as there will be a lexical error

#include<stdio.h>
int main()
{
in/* hhehr*/t t1;
}

Tried this code on the compiler here is what I get

:~$ gcc t1.c
t1.c: In function ‘main’:
t1.c:4:1: error: unknown type name ‘in’
 in/* hhehr*/t t1;
 ^
t1.c:4:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘t1’
 in/* hhehr*/t t1;
               ^


Clearly it shows lexical error

 

0 votes
0 votes
float comment*/  y;

This is an lexical error since end of comment is present but beginning is not present.

Therefore, answer is (d).

Related questions

0 votes
0 votes
2 answers
1
saumya mishra asked Jun 12, 2018
2,174 views
In this question we will take n-=n1 as n=n-n1 as 5 tokens or n-=n1 as 4 tokens ????
4 votes
4 votes
2 answers
2
0 votes
0 votes
1 answer
4
syncronizing asked Sep 21, 2018
5,280 views
Question:Find the number of tokens in the following C code using lexical analyzer of the compiler.