1. Mark all of the following that are valid esacape sequences. Select one or mor
ID: 3567271 • Letter: 1
Question
1. Mark all of the following that are valid esacape sequences.
Select one or more:
a. '
b. \
c.
d. "
e.
f. 99
g. ªa
h.
i.
j. none of the above
k.
2.
sizeof(c) and sizeof(char) return the same value.
Select one:
True
False
3. Binary 00100101 is what in decimal?
I was thinking 37
4. What is the largest unsigned, integral number that can be stored in 4 bytes? (enter a number with no commas)
I was thinking it is 65535 but please double check
5. What do you put after a floating point constant, e.g. 9.1, in an expression to tell the compiler that the constant is a float and not a double, which is the default?
6. Using a char variable in math expressions is invalid, i.e. will cause compile errors.
Select one:
True
False
7. Decimal 95 is what in binary?
I was thinking 01011111.
8. ASCII is a strict subset of Unicode where Unicode uses 2 bytes and you just add leading zeros (0) to the front byte to make an ASCII character into a Unicode character.
Select one:
True
False
9. Although the sizes of data types vary, sizeof(char) usually still returns how many bytes? (answer is a number)
10. Which of the following is NOT a valid combined assignment operator?
Select one:
a. +=
b. -=
c. *=
d. /=
e. %=
f. <<=
g. >>=
h. &=
i. |=
j. ^=
k. all are valid combined assignment oeprators
11. Which of the following is NOT a simple data type?
Select one:
a. char
b. short
c. int
d. long
e. bool
f. enum
g. float
h. double
i. long double
j. unsigned char
k. unsigned short
l. unsigned int
m. unsigned long
n. all of the above
o. none of the above
THANK YOU!
Explanation / Answer
1)
Select one or more:
a. '
b. \
c.
d. "
e.
h.
i.
j. none of the above
k.
----------------------------------------------------------------------------------------------------
2)
True
-----------------------------------------------------------------------------------------------------
3)
37
-----------------------------------------------------------------------------------------------------
4)
0 to 4294967296
---------------------------------------------------------------------------------------------------
5)
double const p = 9.1;
----------------------------------------------------------------------------------------------------------
6)
false
----------------------------------------------------------------------------------------------------------------
7)
True
-------------------------------------------------------------------------------------------------
8)
True
-------------------------------------------------------------------------------------------------
9)
1
--------------------------------------------------------------------------------------------------
10)
j. ^=
-------------------------------------------------------------------------------------------------
11)
enum
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.