
- •Preparation for Final Exam mcq Quiz big - Попытка 1
- •Preparation for Final Exam mcq Quiz big - Попытка 1
- •Preparation for Final Exam mcq Quiz big - Попытка 1
- •Preparation for Final Exam mcq Quiz big - Попытка 1
- •Preparation for Final Exam mcq Quiz big - Попытка 1
- •Preparation for Final Exam mcq Quiz big - Попытка 1
- •Preparation for Final Exam mcq Quiz big - Попытка 1
- •Preparation for Final Exam mcq Quiz big - Попытка 1
- •Preparation for Final Exam mcq Quiz big - Попытка 1
- •Preparation for Final Exam mcq Quiz big - Попытка 1
Preparation for Final Exam mcq Quiz big - Попытка 1
Страница: (Назад) 1 2 3 4 5 6 7 8 9 10 (Далее)
Question51
Баллов: 1
What will !((1 || 0) && 0) evaluate to?
Выберите один ответ.
|
a. Wrong code |
|
|
b. 1 |
|
|
c. 0 |
|
|
d. Undefined behaviour |
|
|
e. I don't know |
|
Question52
Баллов: 1
Repeating a set of instructions a specific number of times is called repetition.
Question53
Баллов: 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. Assign the address of variable number1 to pointer variable fPtr.
Выберите один ответ.
|
a. fPtr = &number1; |
|
|
b. *fPtr = number1; |
|
|
c. fPtr = *number1; |
|
|
d. fPtr = *&number1; |
|
Question54
Баллов: 1
The types of arguments in a function call must match the types of the corresponding parameters in the function prototype's parameter list.
Ответ:
TrueFalse
Question55
Баллов: 1
Every function's body is delimited by left and right braces ({ and }).
Ответ:
TrueFalse
Question56
Баллов: 1
What value is printed out for the variable x? #include <iostream> int x; int main() { int y; std::cout << x << std::endl; std::cout << y << std::endl; return 0; }
Выберите один ответ.
|
a. zero |
|
|
b. 2 |
|
|
c. undefined |
|
|
d. -858993460 |
|
|
e. 3 |
|
Question57
Баллов: 1
Find the error in the following program segment and correct the error:Assume that int a[ 2 ][ 2 ] = { { 1, 2 }, { 3, 4 } };
a[ 1, 1 ] = 5;
Выберите один ответ.
|
a. a[ 1, 1 ] = 5; |
|
|
b. a[ 1 ][ 1 ] = 5; |
|
Question58
Баллов: 1
#include<iostream>
usingnamespace std;
int ifunc(int a) {
return a/10.0;
}
double dfunc(int a) {
return a/10.0;
}
int main() {
cout << ifunc(9) << " " << dfunc(9) << endl;
return 0;
}
Выберите один ответ.
|
a. 0.9 |
|
|
b. 0.9 0 |
|
|
c. 0.9 0.9 |
|
|
d. 0 0.9 |
|
|
e. 0 0 |
|
Question59
Баллов: 1
Write the function header for a function called exchange that takes two pointers to double-precision, floating-point numbers x and y as parameters and does not return a value
Выберите один ответ.
|
a. void exchange( double x, double y ) |
|
|
b. void exchange( double *x, double y ) |
|
|
c. void exchange( double *x, double *y ) |
|
|
d. void exchange( double x, double *y ) |
|
Question60
Баллов: 1
Which of the following lines should NOT compile?1 2 int main() 3 { 4 int a[54] = {}; 5 6 int b[54] = {}; 7 8 int* x = a; 9 10 int* const y = a; 11 12 b = x; 13 14 b = y; 15 16 return 0; 17 }
Выберите один ответ.
|
a. 12, 14 |
|
|
b. 8, 12 |
|
|
c. 8, 10, 12, 14 |
|
|
d. none |
|
|
e. 14 |
|
Страница: (Назад) 1 2 3 4 5 6 7 8 9 10 (Далее)