
Preparation for Final Exam mcq Quiz big - Попытка 2
Начало формы
Страница: (Назад) 1 2 3 4 5 6 7 8 9 10 (Далее)
Question71
Баллов: 1
Declare the array to be an integer array and to have 3 rows and 3 columns. Assume that the constant variable arraySize has been defined to be 3:
Выберите один ответ.
|
a. const int table[ arraySize ][ arraySize]; |
|
|
b. no ideas |
|
|
c. int table[ 3 ][ 2 ]; |
|
|
d. int table[ arraySize ][ arraySize]; |
|
Question72
Баллов: 1
Every function's body is delimited by left and right braces ({ and }).
Ответ:
True
False
Question73
Баллов: 1
If the file-position pointer points to a location in a sequential file other than the beginning of the file, the file must be closed and reopened to read from the beginning of the file
Ответ:
True
False
Question75
Баллов: 1
What (if anything) prints when the following statement is performed?Assume the following variable declarations:
char s1[ 50 ] = "jack"; char s2[ 50 ] = "jill"; char s3[ 50 ]; cout << strlen( s1 ) + strlen( s2 ) << endl;
Выберите один ответ.
|
a. 100 |
|
|
b. 50 |
|
|
c. 101 |
|
|
d. 8 |
|
Question76
Баллов: 1
What value does size print out? #include <iostream> const int SIZE = 5; struct tester { int array[SIZE]; enum { SIZE = 3 }; void size() { std::cout << sizeof(array) / sizeof(int); } }; int main(int argc, char** argv) { tester t; t.size(); return 0; }
Выберите один ответ.
|
a. 8 |
|
|
b. undefined |
|
|
c. 3 |
|
|
d. 0 |
|
|
e. 5 |
|
Question77
Баллов: 1
Which of the following accesses a variable in structure b?
Выберите один ответ.
|
a. b->var; |
|
|
b. b>var; |
|
|
c. b>>var |
|
|
d. b-var; |
|
|
e. b.var; |
|
Question78
Баллов: 1
Write single C++ statements that input integer variable x with cin and >>
Ответ:
Question79
Баллов: 1
Select the best answer to the output of the program:
#include<iostream>
usingnamespace std;
Int main() {
double y = 7;
double *x = &y;
cout << x << " " << x-1 << " " << *x-1;
return 0;
}
Выберите один ответ.
|
a. None of the given choices. |
|
|
b. 002BF7EC 002BF7E8 6 |
|
|
c. 002BF7E0 002BF7E8 6 |
|
|
d. 7 6 002BF7E0 |
|
|
e. 002BF7E0 002BF7D8 6 |
|
Question80
Баллов: 1
The three ways to return control from a called function to a caller are ________, ________ and ________.
Выберите по крайней мере один ответ:
|
a. forward call |
|
|
b. repeat |
|
|
c. stop |
|
|
d. return |
|
|
e. encounter the closing right brace of a function |
|
|
f. goto |
|
|
g. break |
|
|
h. return expression |
|
Страница: (Назад) 1 2 3 4 5 6 7 8 9 10 (Далее)
Preparation for Final Exam MCQ Quiz BIG - Попытка 2
Начало формы
Страница: (Назад) 1 2 3 4 5 6 7 8 9 10 (Далее)
Question81
Баллов: 1
Variables
declared in a block or in the parameter list of a function are
assumed to be of storage class unless
specified otherwise
Question82
Баллов: 1
Use a for statement to print the elements of array numbers using pointer/offset notation with pointer nPtr
Выберите один ответ.
|
a. cout << fixed << showpoint << setprecision( 1 ); for ( int j = 0; j < SIZE; j++ ) cout << *( nPtr + j ) << ' ';
|
|
|
b. cout << fixed << showpoint << setprecision( 1 ); for ( int j = 0; j < SIZE; j++ ) cout << &(* nPtr + j ) << ' '; |
|
|
c. for ( int j = 0; j < SIZE; j++ ) cout << nPtr + j << ' '; |
|
Question83
Баллов: 1
A C++ program that prints three lines of output must contain three statements using cout and the stream insertion operator.
Ответ:
True
False
Question84
Баллов: 1
By default, memory addresses are displayed as long integers
Ответ:
True
False
Question85
Баллов: 1
What is the output of the program?
#include <iostream>
using namespace std;