@ dave .. you r correct :)

On Mon, Feb 7, 2011 at 9:41 PM, Dave <dave_and_da...@juno.com> wrote:

> @Jalaj: The results depend on the "endianness" of the addressing
> scheme on your hardware. (See http://en.wikipedia.org/wiki/Endianness.)
> The language standard does not specify a required endianness. You must
> be using a little-endian hardware, but the results would be different
> on a big-endian system.
>
> Dave
>
> On Feb 6, 11:03 am, jalaj jaiswal <jalaj.jaiswa...@gmail.com> wrote:
> > the logic is :-
> > int is stored in 32 bits in our systems
> >
> > 300 is 00000000 00000000 00000001 00101100
> > as ptr is character pointer, it points to lower 8 bits
> > and when *++ptr=2 gets executed then 00000001 changes to 00000010(equal
> to
> > 2)
> >
> > so i becomes 00000000 00000000 00000010 00101100 which is 556 :D
> >
> > On Sun, Feb 6, 2011 at 10:26 PM, aditya pratap
> > <contacttoadity...@gmail.com>wrote:
> >
> > > @jalaj : gcc compiler.
> >
> > >  --
> > > 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.
> >
> > --
> > With Regards,
> > *Jalaj Jaiswal* (+919019947895)
> > Final Year Undergraduate,
> > IIIT 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.
>
>


-- 
With Regards,
*Jalaj Jaiswal* (+919019947895)
Software developer, Cisco Systems
Final Year Undergraduate,
IIIT 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