Search Header Logo

C++ Advanced Quiz

Authored by Omita Nanda

Information Technology (IT)

University

Used 1+ times

C++ Advanced Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT an example of an Abstract Data Type?

Stack

Queue

int

Linked List

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

An Abstract Data Type is mainly defined in terms of:

Implementation details

User-defined behavior (operations)

Compiler directives

Memory structure

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In C++, objects are created at:

Compile time only

Run time only

Either compile or run time depending on declaration

Link time

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is FALSE about C++ classes?

A class groups data and methods together

A class is a user-defined data type

A class must always have a constructor

An object is an instance of a class

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if you declare a class without any access specifier in C++?

All members are public

All members are private

Compilation error

Members cannot be accessed at all

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Consider the declaration: class A { int x; void fun(); };Here, x and fun() are by default:

private

public

protected

inaccessible

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following about local classes is correct?

They can access static variables of the function

They cannot have static data members

They cannot define methods

They cannot create objects

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?