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
Hey
5
5Hey
Complie error
Chọn C
1 4
1 2 3 4
Syntax error
Syntax error
Chọn A
Complie error
3
1
1 3
Chọn A
loop loop loop
Infinite loop
Complie error
Chọn C
True
False
Complier Error
Run time error
Chọn B
A
B
ABC
Chọn C
A
B
ABC
Chọn B
FALSE
TRUE
Default
Chọn B
3
5
03
05
Chọn C
3
4
5
6
Chọn C
x = 2
x = 6
x = 0
Chọn A
ABC
BC
B
Complier Error
Chọn D
ABC
DEF
Syntax error
Chọn A
Equal
Unequal
nothing is printed
Chọn B
True
False
Complier error
Chọn A
True
False
Complier error
Chọn B
True
False
Complier error
Chọn B
2468101214161820
468101214161820
nothing is printed
Chọn A
C/C++ 15
Java 15
Java 5
Complier error
Chọn A
C/C++ 80
C/C++ 81
Java 80
Java 81
Chọn B
1 12
2 12
2 11
Chọn A
hello_World
ello_World
llo_World
lo_World
Chọn A
hello_World
ello_World
llo_World
lo_World
Chọn C
3
4
5
6
Chọn B
10#15
10#10
15#15
11#15
Chọn A
4#4
4#5
5#6
4#6
Chọn B
400 2
400 400
400 401
Complier error
Chọn A
pvpit
vpit
v
Another
Chọn C
5
7
9
10
Chọn A
1
2
3
None of the lines
Chọn C
Complier error
6
5
Another
Chọn A
5
6
8
Complier Error
Chọn C
4
5
6
Complier Error
Chọn D
320
64
Complier Error
Chọn B
Address of j , Address of i , 3
Complier Error
3 , 3 , 3
Chọn A
printf("\n%d", ptr2);
strcpy(ptr1, "c");
strcpy(ptr2, "questions");
printf("\n%s %s", ptr1, ptr2);
Chọn B
int a = 10;
void *p = &a;
int *ptr = p;
printf("%u\n", *ptr);
Chọn C
3
4
5
6
Chọn A
5 5
Complier Error
5 Garbage value
Chọn A
Address of i Address of i
Garbage value Garbage value
Complier Error
Chọn A
6
7
8
9
Chọn C
I
E
M
N
Chọn D
37363534
34353637
45673333
Chọn A
11
12
Garbage value
Complier error
Chọn A
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
strnstr()
strrchr()
laststr()
strstr()
Chọn B
1006, 2, 2
1006, 4, 4
1002, 5, 5
Error
Chọn A
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
LAPTRINHC++
LAPTRINHC++\0\.NET\0
LAPTRINHC++\0\.NET
Chọn A
LAPTRINHC++.NET
NETLAPTRINHC++
Address of pstr[0] Address of pstr[1]
Chọn A







