Pages - Menu

Monday, 28 July 2014

CHANGING VALUE OF A CONSTANT INTEGER

here is the code..........

#include<stdio.h>
void change(int const*p)
{
*((int*)p)=20;
}
int main()
{
int const x=10;
printf("initial value of x is %d\n",x);
change(&x);
printf("final value of x is %d",x);
return 0;
}


No comments:

Post a Comment