The Gateway to Computer Science Excellence
+1 vote

consider this c code:


will this code fragment gives lexical error or not. If not then who is responsible for this error.

in Compiler Design by (187 points) | 269 views

No lexical error 
check this answer for understanding lexical error 

2 Answers

+4 votes
Best answer

NO lexical error .

whiel will be treated as a function name ,hence a token is there is no lexical error .

it is a semantic  error becz we are colling a function which is not defined.

by Boss (35.7k points)
selected by
+1 vote
No it is not lexical error. There will be no Syntax error as well, but there will be a semantic error because it does not recognize wheil.
by (129 points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,647 questions
56,508 answers
100,962 users