• edited by
1,520 views
2 2 votes
identify the type of error

int main()

{

int gate,exam,rank;

gate=exam=rank=10.3;

printf("%c",gate);

}

a)lexical error

b)syntax error

c)semantic error

d)none of these

1 Answer

0 0 votes
It won't print anything as ASCII character for 10.3/10 is newline; so it won't print anything , but go to the next line. I don't think any error is present. So, D
• edited by
Position:
Show:

Related questions

1 1 vote
2 answers 2 answers
1.2k
1.2k views
Souvik33 asked Jan 12, 2023
1,228 views
What is the earliest stage compiler error for the following C code snippet:int x = @33;Lexical ErrorSyntax ErrorSemantic ErrorNone
0 0 votes
1 1 answer
2.6k
2.6k views
Mohit Aggarwal asked Dec 1, 2021
2,608 views
what is the difference between lexical error and syntax error?
1 1 vote
3 3 answers
1.1k
1.1k views
VJ2793 asked Feb 12, 2019
1,141 views
fro(int I=0; I <5;I++);what kind of compilation error is this ?
6 6 votes
7 7 answers
5.5k
5.5k views
Na462 asked Oct 5, 2018
5,475 views