static char x; printf("%d",x); above statement does not work. but following statement work printf("%bd",x); what is differance between format specifier %d and %bd
"Is that because you've disabled ANSI Integer Promotion...?" No. "ANSI integer promotion" does not affect promotion of arguments to variadic functions.
"... in regular C, a char variable in a printf() statement would be promoted to int? Keil C51 certainly does not do this." Is that because you've disabled ANSI Integer Promotion...?
Is it the case that in regular C, a char variable in a printf() statement would be promoted to int? Keil C51 certainly does not do this. The b is unique to C51.
Thank you.
Yes in That Manual (p288 in mine) look up printf /printf517
Do you mean Cx compiler user guide. If no, then let me know the exaxct web address for "The Manual"
%bd expects signed char, %d expects signed int. There's a really useful document that covers all this stuff available on this website. It's got a bit of a funny name, though: "The manual".
View all questions in Keil forum