@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 <wujinchen...@gmail.com> wrote:
> @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 <dave_and_da...@juno.com>
>
>
>
> > @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 <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=1234567800000010
>
> > > 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.- Hide quoted text -
>
> - Show quoted text -

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