@Prem: Each program is provided with a pool of address, which consist
of heap, stack etc.
             My question is that if I write an address 0xff which is
not provided to that program then
             what will be the output?

On 7/28/11, Prem Krishna Chettri <hprem...@gmail.com> wrote:
> First of all this is a good Question as this is use regularly in Device
> Driver kind of Development Mode and hence there is no question of Not
> Possible.
>
> So how to Do it is Question. which is as follows :-
>
> Point your pointer to mem add that U want and Now this Mem Add is HEX guys
> (Not 4 or 5 or any base 10 val) , so put it as 0x(whatever U want).
>
> Do whatever  U want to do on that address using that pointer now.
>
> The Code above is correct but the implementation is wrong so...
>
>
> #include<stdio.h>
> int main()
> {
>        int *p = (int *)0xff;
>       // *p = 4; /** Dude can U put hex val here .. Oh its already assigned
> to 0xff..  **/ Now print it cout<<p<<endl;
>        return 0;
> }
>
> Regards
>  Prem
>
> On Thu, Jul 28, 2011 at 10:44 AM, Tyler Durden <abhishek.khattr...@gmail.com
>> wrote:
>
>> @Ankita: So when is 4000 memory address is allotted?? I mean what use does
>> int *p = 4000 serve here??
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/algogeeks/-/0OU6tMQudMoJ.
>>
>> 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.

Reply via email to