
Trắc nghiệm C++
Quiz
•
Computers
•
University
•
Hard
Duc Nguyen
Used 1+ times
FREE Resource
Enhance your content
13 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include <iostream>
int main()
{
int a = 10;
cout<<a;
int a = 20;
cout<<a;
return 0;
}
1020
1010
2020
Lỗi: Redeclaration of a
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int x = 10;
int main(){
int x = 0;
cout<<x;
return 0;
}
10
0
compile error
undefined
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int a = 1, b = 1, c;
c = a++ + b;
printf("%d, %d", a, b);
}
a=1, b=1
a=2, b=1
a=1, b=2
a=2, b=2
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Is it possible to run program without main() function?
yes
no
may be
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The output of the following segment is
int k, n=20;
k=(n>5?(n<=10?100:200):500);
printf("%d",n);
100
200
300
20
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Inside try
Exception Caught
After throw
After catch
Inside try
Exception Caught
After catch
Inside try
Exception Caught
Inside try
After throw
After catch
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
The derived class can not call the base class func().
Must place “using namespace Base” at the top of the file.
Base::d.func();
d.Base::func();
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple

Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
10 questions
Arrays
Quiz
•
11th Grade - University
18 questions
CP-String
Quiz
•
University
16 questions
Arithmetic Types Declare Initialize Relation Logical Ops
Quiz
•
9th Grade - University
15 questions
Java Method
Quiz
•
University
18 questions
Programming in C language
Quiz
•
12th Grade - University
10 questions
Array in C
Quiz
•
University
13 questions
C programming-1
Quiz
•
University
15 questions
C Language Quiz-1
Quiz
•
University - Professi...
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
Discover more resources for Computers
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms
Quiz
•
11th Grade - University
38 questions
Unit 6 Key Terms
Quiz
•
11th Grade - University
20 questions
La Hora
Quiz
•
9th Grade - University
7 questions
Cell Transport
Interactive video
•
11th Grade - University
7 questions
What Is Narrative Writing?
Interactive video
•
4th Grade - University