printf « byte « C Data Type Q&A

Home
C Data Type Q&A
1.binary
2.bit
3.byte
4.char
5.character
6.decimal
7.Development
8.float
9.hex
10.integer
11.prime
12.random
13.struct
C Data Type Q&A » byte » printf 

1. printf too smart casting from char to int?    stackoverflow.com

Why does the following call:

printf("%d %d", 'a', 'b');
result in the "correct" 97 98 values? %d indicates the function has to read 4 bytes of data, and printf shouldn't be able to tell ...

2. How to print three bytes in a struct in C    stackoverflow.com

I have the following C code:

person->title
The title is a three byte char array. All I want to do is print those three bytes. I can't use the string formatter with printf ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.