
Trắc nghiệm C++
Authored by Duc Nguyen
Computers
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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();
Access all questions and much more by creating a free account
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
Already have an account?
Similar Resources on Wayground
10 questions
Understanding Email, Contacts and Calendaring
Quiz
•
University
12 questions
Python Quiz 1.4
Quiz
•
University
10 questions
ML Course Activity-II
Quiz
•
University
11 questions
Latex
Quiz
•
University
10 questions
Tree and Planar Graph
Quiz
•
University
10 questions
CodeMonkey for B.Ed IT
Quiz
•
University
10 questions
Bài 25 tin 10
Quiz
•
9th Grade - University
10 questions
Unguided transmission media
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
7 questions
Fragments, Run-ons, and Complete Sentences
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
10 questions
DNA Structure and Replication: Crash Course Biology
Interactive video
•
11th Grade - University
5 questions
Inherited and Acquired Traits of Animals
Interactive video
•
4th Grade - University
5 questions
Examining Theme
Interactive video
•
4th Grade - University
20 questions
Implicit vs. Explicit
Quiz
•
6th Grade - University
7 questions
Comparing Fractions
Interactive video
•
1st Grade - University