400 Câu hỏi trắc nghiệm lập trình C/C++ có đáp án (Phần 5)
50 câu hỏi
What is output?
Hey
5
5Hey
Complie error
Chọn C
What is output?
1 4
1 2 3 4
Syntax error
Syntax error
Chọn A
What is output?\
Complie error
3
1
1 3
Chọn A
What is output?
loop loop loop
Infinite loop
Complie error
Chọn C
What is output?
True
False
Complier Error
Run time error
Chọn B
What is output?
A
B
ABC
Chọn C
What is output?
A
B
ABC
Chọn B
What is output?
FALSE
TRUE
Default
Chọn B
What is output?
3
5
03
05
Chọn C
What is output?
3
4
5
6
Chọn C
What is output?
x = 2
x = 6
x = 0
Chọn A
What is output?
ABC
BC
B
Complier Error
Chọn D
What is output of code?
ABC
DEF
Syntax error
Chọn A
What is output of code?
Equal
Unequal
nothing is printed
Chọn B
What is output of code?
True
False
Complier error
Chọn A
What is output of code?
True
False
Complier error
Chọn B
What is output of code?
True
False
Complier error
Chọn B
What is output of code?
2468101214161820
468101214161820
nothing is printed
Chọn A
What is output of code?
C/C++ 15
Java 15
Java 5
Complier error
Chọn A
What is output of code?
C/C++ 80
C/C++ 81
Java 80
Java 81
Chọn B
What is output of code?
1 12
2 12
2 11
Chọn A
What is output ?
hello_World
ello_World
llo_World
lo_World
Chọn A
What is output?
hello_World
ello_World
llo_World
lo_World
Chọn C
What is output?
3
4
5
6
Chọn B
What is output?
10#15
10#10
15#15
11#15
Chọn A
What is output of following code?
4#4
4#5
5#6
4#6
Chọn B
What is output of following code?
400 2
400 400
400 401
Complier error
Chọn A
What is output?
pvpit
vpit
v
Another
Chọn C
What is output?
5
7
9
10
Chọn A
For the code below which lines should be reported as errors by a compiler?
1
2
3
None of the lines
Chọn C
What is output?
Complier error
6
5
Another
Chọn A
What is output?
5
6
8
Complier Error
Chọn C
What is output of code?
4
5
6
Complier Error
Chọn D
What is output of code?
320
64
Complier Error
Chọn B
What will be output of following program?
Address of j , Address of i , 3
Complier Error
3 , 3 , 3
Chọn A
What will be output of following program?
printf("\n%d", ptr2);
strcpy(ptr1, "c");
strcpy(ptr2, "questions");
printf("\n%s %s", ptr1, ptr2);
Chọn B
What will be output of following program?
int a = 10;
void *p = &a;
int *ptr = p;
printf("%u\n", *ptr);
Chọn C
What will be output of following program?
3
4
5
6
Chọn A
What will be output of following program?
5 5
Complier Error
5 Garbage value
Chọn A
What will be output of following program?
Address of i Address of i
Garbage value Garbage value
Complier Error
Chọn A
What is output?
6
7
8
9
Chọn C
What is output?
I
E
M
N
Chọn D
What will be output of following program?
37363534
34353637
45673333
Chọn A
What is output?
11
12
Garbage value
Complier error
Chọn A
Which of the following statements are correct about an array?
1. The array int num[26]; can store 26 elements
2. The expression num[1] designates the very first element in the array
3. It is necessary to initialize the array at the time of declaration.
4. The declaration num[SIZE] is allowed if SIZE is a macro.
1,4
3
1,2
1
Chọn A
The library function used to find the last occurrence of a character in a string is
strnstr()
strrchr()
laststr()
strstr()
Chọn B
What is output? (assuming that the array begins at the location 1002 and size of an integer is 4 bytes)
1006, 2, 2
1006, 4, 4
1002, 5, 5
Error
Chọn A
What does the following declaration mean?
ptr is array of pointers to 10 integers
ptr is a pointer to an array of 10 integers
ptr is an array of 10 integers
ptr is an pointer to array
Chọn A
What is output?
LAPTRINHC++
LAPTRINHC++\0\.NET\0
LAPTRINHC++\0\.NET
Chọn A
What is output?
LAPTRINHC++.NET
NETLAPTRINHC++
Address of pstr[0] Address of pstr[1]
Chọn A







