Q.

Given the programming constructs i)assignment  ii)for loops where the loop parameter cannot be changed within the loop  iii)if-then-else  iv)forward  go to v)arbitrary go to  vi)non-recursive procedure call vii)recursive procedure/function call  viii)repeat loop, which constructs will you not include in a programming language such that it should be possible to program the terminates (i.e. halting) function in the same programming language.

A.  

ii), iii), iv)

B.  

v), vii), viii)

C.  

vi), vii), viii)

D.  

iii), v), viii)

Similar Questions
1.

Which of the followings is/are automatically added to every class, if we do not write our own.

A.  

Copy Constructor.

B.  

Assignment Operator

C.  

A constructor without any parameter

D.  

All of the above

2.

Which of the following gets called when an object is being created ?

A.  

Constuctor

B.  

Virtual Function

C.  

Destructors

D.  

Main

3.

Destructor has a same name as the constructor and it is preceded by ?

A.  

!

B.  

?

C.  

~

D.  

$

4.

Like constructors, can there be more than one destructors in a class ?

A.  

Yes

B.  

No

C.  

May Be

D.  

Can't Say

5.

Destructors __________ for automatic objects if the program terminates with a call to function exit or function abort

A.  

Are called

B.  

Are not called

C.  

Are inherited

D.  

Are created

6.

Which contructor function is designed to copy object of same class type ?

A.  

Copy constructor

B.  

Create constructor

C.  

Object constructor

D.  

Dynamic constructor

7.

If the copy constructor receives its arguments by value, the copy constructor would

A.  

Call one-argument constructor of the class

B.  

Work without any problem

C.  

Call itself recursively

D.  

Call zero-argument constructor

8.

which of this can not be declared as virtual

A.  

Constructor

B.  

Destructor

C.  

Both A & B

D.  

None of the above

9.

We must use initializer list in a constructor when

A.  

There is a reference variable in class

B.  

There is a constant variable in class

C.  

There is an object of another class. And the other class doesn't have default constructor

D.  

All of the above

10.

Which of the following implicitly creates a default constructor when the programmer does not explicitly define at least one constructor for a class ?

A.  

Preprocessor

B.  

Linker

C.  

Loader

D.  

compiler

PROGRAMMING IN C++ TOPICS