its working..
#includeconio.h
#includestdio.h
int main()
{const int a=123;
printf(%d\n,a);
*(int *)a=345;
printf(%d,a);
getch();
}
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
take a look at this and this is exactly the reason why it works :)
http://stackoverflow.com/questions/3801557/can-we-change-the-value-of-a-constant-through-pointers
On Thu, Oct 6, 2011 at 9:55 AM, Raghav Garg rock.ragha...@gmail.com wrote:
*it is perfectly working in turbo c. can anyone
main()
{const int a=123;
printf(%d,a);
*(int *)a=345;
printf(%d,a);
}
On Oct 4, 3:48 pm, prajon jondhale.pra...@gmail.com wrote:
can u change and if yes how to change value of constant variable?
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
doesnt work in dev cpp
On Tue, Oct 4, 2011 at 4:22 PM, prajon jondhale.pra...@gmail.comwrote:
main()
{const int a=123;
printf(%d,a);
*(int *)a=345;
printf(%d,a);
}
On Oct 4, 3:48 pm, prajon jondhale.pra...@gmail.com wrote:
can u change and if yes how to change value of constant