@Varun Ofcourse It Will !!! :)

On Mon, Jul 25, 2011 at 11:54 AM, varun pahwa <[email protected]>wrote:

> @Rajeev : little endian and big endian could create difference in the
> answers.
>
> On Mon, Jul 25, 2011 at 11:50 AM, rajeev bharshetty 
> <[email protected]>wrote:
>
>> 257 is stored as
>>                                     B          A
>> 00000000 00000000 00000001 00000001
>>
>> So iptr if int* will be pointing to this above
>>
>> So if we typecast it as char* then it will point to 00000001 (A)
>> and *ptr+1 will point to 00000001(B)
>>
>> Hope this clear .
>>
>>
>> On Mon, Jul 25, 2011 at 11:41 AM, aditya kumar <
>> [email protected]> wrote:
>>
>>> main()
>>> {
>>> int i = 257;
>>> int *iPtr = &i;
>>> printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) );
>>> }
>>>
>>> can any one explain me the o/p ??
>>>
>>> --
>>> 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.
>>>
>>
>>
>>
>> --
>> Regards
>> Rajeev N B <http://www.opensourcemania.co.cc>
>>
>>  --
>> 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.
>>
>
>
>
> --
> Varun Pahwa
> B.Tech (IT)
> 7th Sem.
> Indian Institute of Information Technology Allahabad.
> Ph : 09793899112
> Official Email :: [email protected]
> Another Email :: [email protected]
>
> People who fail to plan are those who plan to fail.
>
>  --
> 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.
>



-- 
Regards
Rajeev N B <http://www.opensourcemania.co.cc>

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

Reply via email to