C++ Programming Quiz

C++ Programming Quiz

University

10 Qs

quiz-placeholder

Similar activities

FREEZER QUIZLINE

FREEZER QUIZLINE

University

11 Qs

MIND ZONE 2.2 [LEVEL 2]

MIND ZONE 2.2 [LEVEL 2]

University

10 Qs

Quiz3_DataStruct

Quiz3_DataStruct

University

10 Qs

Python Basics

Python Basics

University

10 Qs

Apuntadores C++

Apuntadores C++

University

11 Qs

Pointer dan Fungsi

Pointer dan Fungsi

University

14 Qs

Desa App y Algoritmos

Desa App y Algoritmos

6th Grade - University

10 Qs

CS1010 Lab 4

CS1010 Lab 4

University

10 Qs

C++ Programming Quiz

C++ Programming Quiz

Assessment

Quiz

Computers

University

Easy

Created by

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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?