vault backup: 2024-10-01 20:56:24
This commit is contained in:
parent
4b90cf2c2d
commit
a8b53fdccb
@ -3,4 +3,24 @@
|
||||
a. `short unsigned int`
|
||||
b. `short float`
|
||||
c. `long double`
|
||||
d. `unsigned long`
|
||||
d. `unsigned long`
|
||||
|
||||
Answer:
|
||||
b. `short float`
|
||||
|
||||
> 4. If `c` is a variable of type `char`, which of the following statements is illegal?
|
||||
|
||||
```c
|
||||
char c;
|
||||
// A:
|
||||
i += c; // i has type int
|
||||
// B:
|
||||
c = 2 * c - 1;
|
||||
// C:
|
||||
putchar(c);
|
||||
// D:
|
||||
printf(c);
|
||||
```
|
||||
|
||||
Answer:
|
||||
D is incorrect because `printf` operates on strings.
|
Loading…
Reference in New Issue
Block a user