in Compiler Design
188 views
1 vote
1 vote
Void main()
{
int x=5,y=2;
int *p;
p=&x;
y=*p;
x=*y;
printf("y is %d x is %d\n",y,x);
}
what are the errors in the above code i think its 2 semantic errors and no lexical error V usage for void wont result in lexical error right ? it should be a type mismatch error and the other error is dereferencing y
in Compiler Design
188 views

1 comment

Yes right. Void is not a lexical error
0
0

Please log in or register to answer this question.

Related questions

0 votes
0 votes
0 answers
1
gateexplore asked in Compiler Design Nov 17, 2023
77 views
gateexplore asked in Compiler Design Nov 17, 2023
77 views