mockers
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Output:Vikas Sir

2 posters

Go down

Output:Vikas Sir Empty Output:Vikas Sir

Post  ballu Sun Feb 01, 2009 10:55 pm

Output of
char x='abc'
printf ("%c",x);
ballu
ballu

Posts : 58
Join date : 2009-02-01

Back to top Go down

Output:Vikas Sir Empty Re: Output:Vikas Sir

Post  ramthegreatcv Mon Feb 02, 2009 12:19 am

its coming as 'c' can anybody explain why?
ramthegreatcv
ramthegreatcv

Posts : 55
Join date : 2009-01-30
Age : 35

Back to top Go down

Output:Vikas Sir Empty @RAM P

Post  ballu Mon Feb 02, 2009 2:06 am

the answer depends on ENDianess of the machine
our machines are little ENDian as such the memory would be first allocated for c then b and then a
so x that takes a single character gets c
however on big endian machines the answer should come 'a';
ballu
ballu

Posts : 58
Join date : 2009-02-01

Back to top Go down

Output:Vikas Sir Empty Re: Output:Vikas Sir

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum