- •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() {
char a[]="klaatu barada nikto";
cout << a[18];
return 0;
}
Выберите один ответ. a. \0
b. o
c. whitespace
d. t
e. The program will not compile.
Question 84
Баллов: 1
Stream manipulator showpoint forces floating-point values to print with the default six digits of precision unless the precision value has been changed, in which case floating-point values print with the specified precision
Ответ:
True
False
Question 85
Баллов: 1
What is the output of the program below?
#include <iostream>
using namespace std;
Int main() {
int y = 99;
int *x = &y;
cout << 3+*x << endl;
return 0;
}
Выберите один ответ. a. 102
b. 399
c. 101
d. 3
e. 99
Question 86
Баллов: 1
What is the output of the program?
#include<iostream>
usingnamespace std;
Int main() {
char str[] = "de_dust";
for (int i=strlen(str)-1; i>=0; i--)
cout << str[i];
cout << endl;
return 0;
}
Выберите один ответ. a. sud_e
b. tsud_e
c. de_dust
d. tsud_ed
e. sud_ed
Question 87
Баллов: 1
What is the output of the program?
#include <iostream>
using namespace std;
Int main() {
int a=10, b=3;
int * c = &a;
*c = 5;
cout << a << " " << b;
return 0;
}
Выберите один ответ. a. 10 3
b. None of the given choices.
c. 5 3
d. 5 5
e. 3 5
Question 88
Баллов: 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;
Question 89
Баллов: 1
Does the following code pass the parameters to the function swap2 by reference?
#include <iostream>
using namespace std;
void swap2(int a ,int b ){
int temp = a;
a = b;
b = temp;
}
Int main(){
int a = 5 ,b = 7;
swap2(a,b);
cout << a << " " << b;
return 0;
}
Ответ:
True
False
Question 90
Баллов: 1
What output will be produced by the following code?
int extra = 2;
if (extra < 0)
cout << "small";
else if (extra == 0)
cout << "medium";
else
cout << "large";
Выберите один ответ. a. medium
b. Error
c. None of the given choices.
d. large
e. small
Страница: (Назад) 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 91
Баллов: 1
What is the value of the local variable x at the end of main?
int x = 5;
