Re: [algogeeks] Re: constant

2011-10-05 Thread SUDHIR RAHEJA
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

Re: [algogeeks] Re: constant

2011-10-05 Thread ankit sablok
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

[algogeeks] Re: constant

2011-10-04 Thread prajon1111
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

Re: [algogeeks] Re: constant

2011-10-04 Thread Dheeraj Sharma
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