#Solution void main() { int i=10, j=2; int *ip= &i, *jp = &j; int - TopicsExpress



          

#Solution void main() { int i=10, j=2; int *ip= &i, *jp = &j; int k = *ip/*jp; printf(“%d”,k); getch(); } Output: Compiler Error: “Unexpected end of file in comment started in line 5”. Explanation: The programmer intended to divide two integers, but by the “maximum munch” rule, the compiler treats the operator sequence / and * as /* which happens to be the starting of comment. To force what is intended by the programmer, int k = *ip/ *jp; // give space explicity separating / and * //or int k = *ip/(*jp); // put braces to force the intention #Akshay kumar
Posted on: Tue, 01 Oct 2013 11:06:13 +0000

Recently Viewed Topics




© 2015