Test Questions

Test Questions

12th Grade

5 Qs

quiz-placeholder

Similar activities

Object Oriented Programming in Python

Object Oriented Programming in Python

12th Grade

10 Qs

Java for Geeks and Dummies

Java for Geeks and Dummies

12th Grade - University

10 Qs

CSAwesome 5.4 - 5.6

CSAwesome 5.4 - 5.6

10th - 12th Grade

8 Qs

OOP

OOP

9th - 12th Grade

10 Qs

object oriented programming

object oriented programming

11th Grade - University

10 Qs

Object-Oriented Programming (OOP) in Python 3 Quiz

Object-Oriented Programming (OOP) in Python 3 Quiz

12th Grade

10 Qs

CodeHS 4.15 Interfaces

CodeHS 4.15 Interfaces

9th - 12th Grade

10 Qs

AQA - Unit 7 - OOP

AQA - Unit 7 - OOP

11th - 12th Grade

10 Qs

Test Questions

Test Questions

Assessment

Quiz

Computers

12th Grade

Hard

Created by

Code Marathon

Used 3+ times

FREE Resource

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

1. What is the purpose of a pure virtual function in C++?
a) To ensure that the function is never called
b) To provide a default implementation for derived classes
c) To make a class abstract and require derived classes to implement it
d) To enable function overloading

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

2. In C++, what is the difference between an object and a class?
a) An object is a blueprint for creating instances of a class.
b) An object is an instance of a class, and a class is a blueprint.
c) An object is a function inside a class, and a class is an instance of the object.
d) An object and a class are the same thing in C++.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

3. Which of the following is not a C++ standard library container?
a) vector
b) queue
c) array
d) stack

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

4. What is the purpose of the 'new' operator in C++?
a) To delete memory allocated by the 'malloc' function
b) To allocate memory for an array of elements
c) To create a new instance of a class
d) To open a new file for reading

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

5. In C++, what is the role of the 'typeid' operator?
a) It returns the type information of a variable or expression.
b) It checks if a variable is of primitive type.
c) It is used to cast variables to a different type.
d) It is used to determine the size of an array.