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
<[email protected]> wrote:
> yes saurabh the value of a has not changed
>
> On Sat, Aug 6, 2011 at 11:20 AM, aditi garg <[email protected]>
> 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 <[email protected]> wrote:
>>>
>>> http://ideone.com/Wszkg
>>> On Sat, Aug 6, 2011 at 8:03 PM, jagrati verma
>>> <[email protected]> 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 [email protected].
>>>> To unsubscribe from this group, send email to
>>>> [email protected].
>>>> 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 [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected].
>>> 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 [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> 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 [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> 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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.