Sunday, November 27, 2011

Output & Errors

void main()
{
  int const *p=100;
  printf("%d" , ++(*p));
}


Output:

Compiler Error. Since *p i.e. value at location p has been declared constant, and in the print statement we attempt to modify its value.

0 comments:

Post a Comment