- •Int main(int argc, char** argv)
- •Int main() {
- •Int main(int argc, char** argv)
- •Int main(int argc, char** argv)
- •Int main() {
- •Int main()
- •Int main() {
- •Int main()
- •Int main() {
- •Int main() {
- •Int main() {
- •Int main(){
- •Int main() {
- •Int main(int argc, char** argv)
- •Int main() {
- •Int main() {
- •Int main(int argc, char** argv)
Int main() {
int a = 17;
if (a>10) {
cout << "A";
}
if (a%10==0) {
cout << "B";
} else {
cout << "C";
}
cout << endl;
return 0;
}
Выберите один ответ. a. AB
b. A
c. B
d. C
e. AC
Страница: (Назад) 1 2 3 4 5 6 7 8 9 10 (Далее)
Preparation for Final Exam MCQ Quiz BIG - Попытка 1
Страница: (Назад) 1 2 3 4 5 6 7 8 9 10 (Далее)
Question 71
Баллов: 1
Declare the variables c, thisIsAVariable, q76354 and number to be of type int.
Выберите по крайней мере один ответ: a. int c;
int thisIsAVariable;
int q76354
int number;
b. int c, thisIsAVariable, q76354, number;
c. double c, thisIsAVariable, q76354, number;
d. int c, thisIsAVariable, q76354, number
Question 72
Баллов: 1
What value should be printed for x?
#include <iostream>
Int main()
{
int x = int() = 3;
std::cout << x << std::endl;
return 0;
}
Выберите один ответ. a. 3
b. -858993460
c. 0
d. won't compile
e. undefined
Question 73
Баллов: 1
Which one is incorrect, according to the ANSI specifications?
Выберите один ответ. a. void main()
b. None of these
c. void main(void)
d. int main()
e. All of these
Question 74
Баллов: 1
Write one or more statements that perform the following task for and array called “fractions”. Assign the value 1.667 to array element 9
Выберите один ответ. a. no ideas
b. fractions( 8 ) = 1.667;
c. fractions( 9 ) = 1.667;
d. fractions[ 9 ] = 1.667;
e. fractions[ 8 ] = 1.667;
Question 75
Баллов: 1
Find the error in the following program segment:
int sum( int x, int y )
{
int result;
result = x + y;
}
Выберите один ответ. a. all variants are correct
b. int sum( int x, int y )
{
return x + y;
}
c. result sum( int x, int y )
{
int result;
result = x + y;
}
d. int sum( int x, int y )
{
result x + y;
}
e. not sure
Question 76
Баллов: 1
For a local variable in a function to retain its value between calls to the function, it must be declared with the ________ storage-class specifier
Выберите по крайней мере один ответ: a. register
b. static
c. auto
d. member
e. local
Question 77
Баллов: 1
C++ considers the variables number and NuMbEr to be identical.
Ответ:
True
False
Question 78
Баллов: 1
Storage-class specifier is a recommendation to the compiler to store a variable in one of the computer's registers.
Question 79
Баллов: 1
What is the result of the following code?
x=0;
switch(x)
{
case 1: cout<<"One";
case 0: cout<<"Zero";
case 2: cout<<"Hello World";
}
Выберите один ответ. a. ZeroHello World
b. One
c. OneZero
d. Zero
e. Hello World
Question 80
Баллов: 1
Variables declared in a block or in the parameter list of a function are assumed to be of storage class unless specified otherwise
Страница: (Назад) 1 2 3 4 5 6 7 8 9 10 (Далее)
Preparation for Final Exam MCQ Quiz BIG - Попытка 1
Страница: (Назад) 1 2 3 4 5 6 7 8 9 10 (Далее)
Question 81
Баллов: 1
Write single C++ statements that determine whether i is less than or equal to y
Выберите один ответ. a. if (y<=i)
b. while (i<=y)
c. if (i<=y)
d. if (i>=y)
Question 82
Баллов: 1
Which of the following is a two-dimensional array?
Выберите один ответ. a. int anarray[20][20];
b. int anarray[20],[20];
c. char array[20];
d. array anarray[20][20];
e. int array[20, 20];
Question 83
Баллов: 1
What is the output of the program?
#include <iostream>
using namespace std;
