
C++ Programming Quiz
Authored by Mr. vikas
Computers
University
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of the following is the correct way to declare a constant in C++?
int const x = 10;
const int x = 10;
#define x 10
All of the above
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the default access specifier for members of a class in C++?
public
private
protected
internal
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which operator is used to resolve the scope of a class or namespace in C++?
->
.
::
:
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the output of the following code? int a = 5, b = 2; cout << a / b;
2.5
2
3
Error
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which feature of OOP allows the same function to behave differently on different classes?
Encapsulation
Inheritance
Polymorphism
Abstraction
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of the following is a correct syntax to create a pointer in C++?
int *ptr;
int &ptr;
int ptr*;
pointer int ptr;
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the return type of the main() function in C++?
void
int
float
char
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
CodeMonkey for B.Ed IT
Quiz
•
University
10 questions
Android
Quiz
•
University
10 questions
TOOLS FOR AD & TECHNOLOGY DEVELOPMENT (W4-W6)
Quiz
•
University
10 questions
Understanding Email, Contacts and Calendaring
Quiz
•
University
12 questions
Python Quiz 1.4
Quiz
•
University
10 questions
Logika Fuzzy
Quiz
•
University
11 questions
Latex
Quiz
•
University
10 questions
Tree and Planar Graph
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
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade