Lexical analysis


#1

void main()
{
int total-value, Num=2,sum=5,var1;
5=Num;
var1=2;
sum=num*1;
if(sum=var1)
{
sum=sum+1
}
}
Here, is “total-value” a lexical error?


#2

Yes the Compiler will generate a lexical error.For removing this error you should declare this variable with an underscore i.e. total_value