Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Quiz 1

Total questions: 15

Worksheet time: 6mins

Name
Class
Date
1.

Who invented C++?

a)

Dennis Ritchie

b)

Ken Thompson

c)

Brian Kernighan

d)

Bjarne Stroustrup

2.

What is C++?

a)

C++ is an object oriented programming language

b)

C++ is a procedural programming language

c)

C++ supports both procedural and object oriented programming language

d)

C++ is a functional programming language

3.

Which of the following is a correct identifier in C++?

a)

VAR_1234

b)

$var_name

c)

7VARNAME

d)

7var_name

4.

Which of the following type is provided by C++ but not C?

a)

double

b)

float

c)

int

d)

bool

5.

What is the value of p in the following C++ code snippet?

a)

12

b)

0

c)

2

d)

16

6.

Which of the following is used to terminate the function declaration in C++?

a)

;

b)

]

c)

)

d)

:

7.

Which concept allows you to reuse the written code in C++?

a)

Inheritance

b)

Polymorphism

c)

Abstraction

d)

Encapsulation

8.

How are the constants declared?

a)

const keyword

b)

#define preprocessor

c)

both const keyword and #define preprocessor

d)

$define

9.

What will be the output of the following C++ code?

a)

5

b)

6

c)

Error

d)

8

10.

The value 132.54 can be represented using which data type?

a)

double

b)

void

c)

int

d)

bool

11.

What will be the output of the following C++ code?

a)

12.5664

b)

13.5664

c)

10

d)

15

12.

Regarding the following statement which of the statements is true?

const int a = 100;

a)

Declares a variable a with 100 as its initial value

b)

Declares a construction a with 100 as its initial value

c)

Declares a constant a whose value will be 100

d)

Constructs an integer type variable with an as identifier and 100 as the value

13.

5 + 7 =

(a)  

14.

3.7 + 8.0 =

(a)  

15.

5 + 8.0 =

(a)