Re: [algogeeks] Re: constant
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 algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Re: constant
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 explain how it can change the value of constant variable. *Thanking you *With regards- Raghav garg Contact no. 9013201944 www.facebook.com/rock.raghavag B. tech (IT), 5th sem University School Of Information Technology Guru Govind Singh Indraprastha University Delhi* On Thu, Oct 6, 2011 at 9:52 AM, SUDHIR RAHEJA raheja.sudhirah...@gmail.com wrote: 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 algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Re: constant
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 group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Re: constant
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 variable? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- *Dheeraj Sharma* -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.