OOPs (NCO)

C

8 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

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
Question 2 Multiple Choice (Single Answer)

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
Question 3 Multiple Choice (Single Answer)

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
Question 4 Multiple Choice (Single Answer)

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
Question 5 Multiple Choice (Single Answer)

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. ++
Question 6 Multiple Choice (Single Answer)

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
Question 7 Multiple Choice (Single Answer)

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
Question 8 Multiple Choice (Single Answer)

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()