a. The population of East Simpleson
b. The cost of a movie on DVD
c. The most common letter in this chapter
d. The number of times that the letter occurs in this chapter
a. int b. float c. char d. intapp
one reason is that long may accommodate larger numbers than int on your system; another reason is that if you do need to handle larger values, you improve portability by using a type guaranteed to be at least 32 bits on all systems.ide
To get exactly 32 bits, you could user int32_t, provided it was defined for your system. To get the smallest type that could store at least 32 bits, use int_least32. And to get the type that would provide the fastest computations for 32 bits, choose int_fast32_t.this
a. '\b'
b. 1066
c. 99.44
d. 0XAA
e. 2.0e30
a. char constant(but stored as type int)spa
b. int constantcode
c. double constantorm
d. unsigned int constant, hexadecimal formatci
e. double constantget
Constant |
Type |
Specifier |
a. 12 |
intit |
%dio |
b. 0X3 |
unsigned int |
%#x |
c. ‘C’ |
char(really int) |
%c |
d. 2.34E07 |
double |
%f |
e. '040' |
char(really int) |
%c |
f. 7.0 |
double |
%f |
g. 6L |
long |
%ld |
h 6.0f |
float |
%f |
i 0x5.b6p12 |
float |
%a |
Constant |
Type |
Specifier |
a. 012 |
unsigned int |
%#o |
b. 2.9e05L |
long double |
%Le |
c. 's' |
char(really int) |
%c |
d. 100000 |
long |
%ld |
e. '\n' |
char(really int) |
%c |
f. 20.0f |
float |
%f |
g. 0x44 |
unsigned int |
%x |
h. -40 |
int |
%d |
int imate = 2; long shot = 53456; char grade = 'A'; float log = 2.71828;
printf("The odds against the %__ were %__ to 1.\n", imate, shot); printf("A score of %__ is not an %__ grade.\n", log, grade);
%d %ld
%f %c
ch = '\r'; ch = 13; ch = '\015'; ch = '\xd';
a. \n
b. \\
c. \"
d. \t
a. A newline character
b. A backslash character
c. A double quotation character
d. A tab character