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

2011-09-19 Thread Dave
@Wujin: Okay. b is but an integer, yet it is being printed as a long long. Since there are no implicit type conversions in procedure calls such as the printf statement, b is taken as a long long, not of an int. So b and the next 32-bits are printed. The format that these are printed in is a figment

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

2011-09-19 Thread Dave
@Wujin: Okay. But b is an integer and it is being printed as a long long. Since there are no implicit type conversions in procedure calls such as the printf statement, b is taken as a long long, not of an int. So b and the next 32-bits are printed. Dave On Sep 19, 8:18 pm, wujin chen wrote: > @D

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

2011-09-19 Thread wujin chen
@Dave printf("a=%x, b=%llx",a,b,c); i think c will be ignored~~ , and the output is a=9,b=10 2011/9/19 Dave > @Wujin: What do you expect the output to be? How does it differ from > what you actually get? > > Dave > > On Sep 18, 8:47 am, wujin chen wrote: > > usigned long long x = 0x12345678;

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

2011-09-18 Thread Dave
@Wujin: What do you expect the output to be? How does it differ from what you actually get? Dave On Sep 18, 8:47 am, wujin chen 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~~