0

OOPs (NCO)

Description: C
Number of Questions: 8
Created by:
Tags: C OOPs
Attempted 0/8 Correct 0 Score 0

Which of the following variables in C++ must be initialised at the time of declaration?

  1. Static variable

  2. Reference variable

  3. Automatic variable

  4. Global variable

  5. Pointer variable


Correct Option: B
Explanation:

This type of variable in C++ must be initialised at the time of declaration.

Which of the following is a manipulator in C++ used to format the data display?

  1. Malloc

  2. New

  3. Delete

  4. Set

  5. If


Correct Option: D
Explanation:

This is a manipulator in C++ used to format the data display.

Which of the following data types in C++ provides a way for attaching names to numbers, thereby increasing comprehensibility of the code?

  1. Array

  2. Functions

  3. Enumeration

  4. Structure

  5. Union


Correct Option: C
Explanation:

This data type in C++ provides a way for attaching names to numbers, thereby increasing comprehensibility of the code.

Which of the following functions is not in the scope of the class to which it has been declared?

  1. Inline function

  2. Static function

  3. Friend function

  4. Virtual function

  5. Global function


Correct Option: C
Explanation:

This type of function is not in the scope of the class to which it has been declared.

Which of the following member dereferencing operators is used to access a member using a pointer to the object and a pointer to that member?

  1. ::*

  2. *

  3. ->*

  4. ==

  5. ++


Correct Option: C
Explanation:

This member dereferencing operator is used to access a member using a pointer to the object and a pointer to that member.

Which of the following parts in general structure of C++ program comes first while writing a program in C++?

  1. Class declaration

  2. Class member function definition

  3. Preprocessor directives

  4. The main() function program

  5. The closing of the main() program


Correct Option: C
Explanation:

This part in general structure of C++ program comes first while writing a program in C++.

Which of the following user defined types in C++ is used to give new names to existing data type and allows the user to declare an identifier to represent an existing data type?

  1. Structure

  2. Typedef

  3. Enumeration

  4. Union

  5. Class


Correct Option: B
Explanation:

This user defined type in C++ is used to give new names to existing data type and allows the user to declare an identifier to represent an existing data type.

Which of the following string handling functions in C++ is used to convert a string into upper case?

  1. strcat()

  2. strlwr()

  3. strrev()

  4. strupr()

  5. strlen()


Correct Option: D
Explanation:

This string handling function in C++ is used to convert a string into upper case.

- Hide questions