0
Alien head

C++ Fundamentals

Description: Notes and test papers for C++, OOPS, Programming in C++, Introduction to C++, OOPS using C++, Class, Object, Object Oriented Programming in C++
Number of Questions: 25
Created by:
Tags: C++ OOPS Programming in C++ Introduction to C++ OOPS using C++ Class Object Object Oriented Programming in C++ Programming
Attempted 0/25 Correct 0 Score 0

A static member function can change

  1. any member of the class instances

  2. only static members of class instances

  3. only integer values

  4. none of the above


Correct Option: B

Destructor function is called when the object

  1. goes out of scope

  2. expires

  3. both (1) and (2)

  4. none of the above


Correct Option: C

Which of the following operators can be overloaded in C++?

  1. +=

  2. =

  3. = =

  4. All of the above


Correct Option: D

Default constructor has

  1. no arguments

  2. one argument

  3. two arguments

  4. an object argument


Correct Option: A

For class person, destructor would be

  1. `Person

  2. ~Person

  3. :Person

  4. None of the above


Correct Option: B

How many types of constructors are possible in C++?

  1. 1

  2. 2

  3. 3

  4. 4


Correct Option: C

'ostream.put method' is used to write

  1. a string

  2. a char

  3. an int

  4. all of the above


Correct Option: B

How many objects of a class can be instantiated?

  1. 1

  2. 5

  3. 99

  4. No limit


Correct Option: D

>> is also called

  1. extraction operator

  2. insertion operator

  3. unary Operator

  4. binary operator


Correct Option: A

Structure in C++ can store

  1. only similar data type

  2. any data type

  3. only two data types

  4. only 5 data types


Correct Option: B

To set the precision of floating point number, you use

  1. Cout.prec()

  2. Cout.precision

  3. Cout.Precision

  4. None of the above


Correct Option: B

Inheritance is used to

  1. reuse code

  2. add functionality

  3. both (1) and (2)

  4. none of the above


Correct Option: C

Class Libraries can be used

  1. to reuse code

  2. for component based programming

  3. both (1) and (2)

  4. none of the above


Correct Option: C

Class is best described as

  1. a user defined data type

  2. a data type

  3. a template for objects

  4. all of the above


Correct Option: C

Objects are used to

  1. mimic real life cases

  2. wake at abstract level

  3. both (1) and (2)

  4. none of the above


Correct Option: C

C++ language is a/an

  1. object oriented language

  2. structured language

  3. procedural language

  4. none of the above


Correct Option: A

Private data can be inherited.

  1. True

  2. False

  3. Sometimes true

  4. None of the above


Correct Option: B

Methods are generally

  1. private

  2. public

  3. protected

  4. none of the above


Correct Option: B

Class definition is terminated by

  1. @

  2. !

  3. :

  4. ;


Correct Option: D

In C,

  1. data is secure

  2. data is insecure

  3. data is abstract

  4. none of the above


Correct Option: B

In C++,

  1. data is secure

  2. data is insecure

  3. data is abstract

  4. none of the above


Correct Option: B

The entry point of C++ program is

  1. the first line of the class

  2. the main function

  3. the first executable method of the class

  4. none of the above


Correct Option: B

Which of the following is not a C++ keyword?

  1. asm

  2. signed

  3. export

  4. inline


Correct Option: C

In argument passing by value,

  1. same variable is accessed in called function

  2. new variable is accessed in called function

  3. new object is created in memory

  4. both (2) and (3)


Correct Option: D

Which of the following is not a C++ keyword?

  1. _cs

  2. _ss

  3. _ds

  4. _cc


Correct Option: D
+ View questions