We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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
%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".
Do you mean Cx compiler user guide. If no, then let me know the exaxct web address for "The Manual"
Yes in That Manual (p288 in mine) look up printf /printf517
Thank you.
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.
"... 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 that because you've disabled ANSI Integer Promotion...?" No. "ANSI integer promotion" does not affect promotion of arguments to variadic functions.