
C++ Programming Quiz

Quiz
•
Computers
•
University
•
Easy

Mr. vikas
Used 3+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
11 questions
Quiz 2: C++ Basics

Quiz
•
University
8 questions
Sistemas Operativos - Capítulo 5 - Memória e Ponteiros

Quiz
•
University
12 questions
C++ Basics (1)

Quiz
•
University
13 questions
Revision 2 MCA

Quiz
•
University
15 questions
uNIT 11_14

Quiz
•
University
10 questions
C++ Identifiers and Constants Quiz

Quiz
•
University
15 questions
Quiz 1

Quiz
•
University
14 questions
FuncionesC

Quiz
•
University
Popular Resources on Wayground
15 questions
Hersheys' Travels Quiz (AM)

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
30 questions
Lufkin Road Middle School Student Handbook & Policies Assessment

Quiz
•
7th Grade
20 questions
Multiplication Facts

Quiz
•
3rd Grade
17 questions
MIXED Factoring Review

Quiz
•
KG - University
10 questions
Laws of Exponents

Quiz
•
9th Grade
10 questions
Characterization

Quiz
•
3rd - 7th Grade
10 questions
Multiply Fractions

Quiz
•
6th Grade