HOME | LAB PROGRAMMING | RATIONAL ROSE DIAGRAM | COMPUTE GRAPHICS | CLASS DIAGRAM | NETWORK PROGRAMING | BEST OF THE SITE

Constant value in c/c++

void main()
{
int const *p=5;
printf(“%d”,++(*p));
}
c/c++ Tutorial Answer:Compiler error: cannot modify a constant value
Debugging solution:First we can not change the constant value.soP is a pointer to a “constant integer”, but we tried to change the value of the “constant integer”

0 comments: