[algogeeks] c output,printf(%llx)

2011-09-18 Thread wujin chen
usigned long long x = 0x12345678;
int a = 0x09;
int b = 0x10;
printf(a=%x, b=%llx,a,b,c);

the result is: a=9,b=123456780010

i wonder why~~

can anyone explain it?
thanks.

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



Re: [algogeeks] c output,printf(%llx)

2011-09-18 Thread sagar pareek
Check out what u have written...


On Sun, Sep 18, 2011 at 7:17 PM, wujin chen wujinchen...@gmail.com wrote:

 usigned long long x = 0x12345678;
 int a = 0x09;
 int b = 0x10;
 printf(a=%x, b=%llx,a,b,c);

 the result is: a=9,b=123456780010

 i wonder why~~

 can anyone explain it?
 thanks.

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




-- 
**Regards
SAGAR PAREEK
COMPUTER SCIENCE AND ENGINEERING
NIT 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.



Re: [algogeeks] c output,printf(%llx)

2011-09-18 Thread wujin chen
sorry , it should be :

usigned long long c = 0x12345678;
int a = 0x09;
int b = 0x10;
printf(a=%x, b=%llx,a,b,c);


2011/9/19 sagar pareek sagarpar...@gmail.com

 Check out what u have written...


 On Sun, Sep 18, 2011 at 7:17 PM, wujin chen wujinchen...@gmail.comwrote:

 usigned long long x = 0x12345678;
 int a = 0x09;
 int b = 0x10;
 printf(a=%x, b=%llx,a,b,c);

 the result is: a=9,b=123456780010

 i wonder why~~

 can anyone explain it?
 thanks.

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




 --
 **Regards
 SAGAR PAREEK
 COMPUTER SCIENCE AND ENGINEERING
 NIT 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.


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