660 views
0 votes
0 votes
void main()
{
    int i=10, j=2;
    int *ip= &i, *jp = &j;
    int k = *ip/*jp;
    printf(“%d”,k);
}

1 Answer

Best answer
3 votes
3 votes

IN LINE 5  the compiler treats the operator
sequence / and * as /* which happens to be the starting of
comment

SO IT GENERATES SYNTAX ERROR:UNEXPECTED END OF FILE.

HERE IS THE REFERENCE(MAXIMAL MUNCH)

https://en.wikipedia.org/wiki/Maximal_munch

selected by

Related questions

0 votes
0 votes
1 answer
1
Desert_Warrior asked May 16, 2016
785 views
main() { int i=-1; -i; printf("i = %d, -i = %d \n",i,-i); }
2 votes
2 votes
1 answer
2