The value of a has changed but it doesnt appears so...Thats bcoz the
compilers are smart enough in dealing with const variables...The value has
changed but doesnt appears so when you print it.....

On Sun, Aug 7, 2011 at 1:15 AM, Jyoti Gupta <2006gu...@gmail.com> wrote:

> but how do they both point to same address location ??
>
>
> On 7 August 2011 01:05, jagrati verma <jagrativermamn...@gmail.com> wrote:
>
>> thanku all.....................
>>
>> On Sun, Aug 7, 2011 at 12:58 AM, Debabrata Das
>> <debabrata.barunhal...@gmail.com> wrote:
>> > try this:
>> > const int a=54;
>> >        int *p=(int *)&a;
>> >        *p=100;
>> >        printf("%d\n",*p);
>> >        printf("%x %x",p,&a);
>> >
>> >
>> >
>> > On Sun, Aug 7, 2011 at 12:28 AM, UTKARSH SRIVASTAV
>> > <usrivastav...@gmail.com> wrote:
>> >> yes saurabh the value of a has not changed
>> >>
>> >> On Sat, Aug 6, 2011 at 11:20 AM, aditi garg <aditi.garg.6...@gmail.com
>> >
>> >> wrote:
>> >>>
>> >>> @saurabh
>> >>> http://ideone.com/J0gNi
>> >>> its jst pointing to same address bt it has not modified the
>> value...chk
>> >>> the abv link...
>> >>> On Sat, Aug 6, 2011 at 8:13 PM, saurabh singh <saurab...@gmail.com>
>> wrote:
>> >>>>
>> >>>> http://ideone.com/Wszkg
>> >>>> On Sat, Aug 6, 2011 at 8:03 PM, jagrati verma
>> >>>> <jagrativermamn...@gmail.com> wrote:
>> >>>>>
>> >>>>> how can modify constant variable with the help of pointers.
>> >>>>>
>> >>>>> --
>> >>>>> 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.
>> >>>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> --
>> >>>> Saurabh Singh
>> >>>> B.Tech (Computer Science)
>> >>>> MNNIT ALLAHABAD
>> >>>>
>> >>>>
>> >>>> --
>> >>>> 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.
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> Aditi Garg
>> >>> Undergraduate Student
>> >>> Electronics & Communication Divison
>> >>> NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
>> >>> Sector 3, Dwarka
>> >>> New Delhi
>> >>>
>> >>> --
>> >>> 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.
>> >>
>> >>
>> >>
>> >> --
>> >> UTKARSH SRIVASTAV
>> >> CSE-3
>> >> B-Tech 3rd Year
>> >> @MNNIT ALLAHABAD
>> >>
>> >> --
>> >> 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.
>>
>>
>
>
> --
> Jyoti Gupta
> COE , 4th year
> Delhi College of Engineering
>
>  --
> 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.
>



-- 
Saurabh Singh
B.Tech (Computer Science)
MNNIT ALLAHABAD

-- 
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.

Reply via email to