edited by
731 views
2 votes
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
edited by

1 Answer

0 votes
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

Related questions

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