Начало формы
Question1
Баллов: 1
Write one or more statements that perform the following task for and array called “fractions”.Refer to array element 4.
Выберите один ответ.
| a. fractions[ 3 ] | |
| b. fractions(3) | |
| c. fractions(4) | |
| d. no ideas | |
| + | e. fractions[ 4 ] |
Question2
Баллов: 1
What keyword covers unhandled possibilities?
Выберите один ответ.
| a. all | |
| b. other | |
| c. else | |
| d. contingency | |
| + | e. default |
Question3
Баллов: 1
Determine the value, true or false, of each of the following Boolean expressions, assuming that the value of the variable count is 0 and the value of the variable limit is 10.
!(((count < 10) || (x < y)) && (count >= 0))
Выберите один ответ.
| a.!(=true) | |
| b. true | |
| c. None of the given choices. | |
| d. Both true and false | |
| + | e. false |
Question4
Баллов: 1
Which of these has the lowest precedence priority?
Выберите один ответ.
| a. >> | |
| b.?: | |
| + | c. \ | |
| d. || | |
| e. && |
Question5
Баллов: 1
The stream member function flags with no arguments resets the stream's format state
Ответ:
+ False
Question6
Баллов: 1
How many times is a do while loop guaranteed to loop?
Выберите один ответ.
| a. Variable | |
| b. 1 | |
| c. 0 | |
| + | d. Infinitely | |
| e. 5 |
Question7
Баллов: 1
Use a stream manipulator to ensure floating-point values print in scientific notation
Выберите один ответ.
| + | a. cout << scientific; | |
| b. cout << setprecision(2)<<fixed; |
Question8
Баллов: 1
Write a single statement that performs the specified task. Assume that floating-point variables number1 and number2 have been declared and that number1 has been initialized to 7.3. Assume that variable ptr is of type char *. Assume that arrays s1 and s2 are each 100-element char arrays that are initialized with string literals. Append the first 10 characters from the string in s2 to the string in s1.
Выберите один ответ.
| a. catstrn(s1, s2, 10); | |
| + | b. strncat(s1, s2, 10); | |
| c. string_cat(s1, s2, 10); |
Question9
Баллов: 1
Which of the following is a valid inline for function foo?
Выберите один ответ.
| + | a. inline:void foo() {} | |
| b. None | |
| c. inline int foo() {} | |
| d. void foo() inline {} | |
| e. inline void foo() {} |
Question10
Баллов: 1
All variables must be declared before they are used.
Ответ:
+True






