C++ Programming Fundamentals

Comprehensive quiz covering C++ programming basics including operators, control structures, functions, data types, and object-oriented programming concepts such as inheritance, polymorphism, and encapsulation.

25 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which of the following types of functions in C++ perform an action and have no explicit return value?

  1. Computational functions
  2. Manipulative functions
  3. Procedural functions
  4. None of these
Question 2 Multiple Choice (Single Answer)

Which of the following conversions is known as user-defined type conversion in C++?

  1. Explicit type conversion
  2. Implicit type conversion
  3. Type promotion conversion
  4. None of these
Question 3 Multiple Choice (Single Answer)

Which of the following functions is used in C++ to convert its arguments to uppercase letters if the argument is a letter?

  1. isupper()
  2. tolower()
  3. isalnum()
  4. toupper()
Question 4 Multiple Choice (Single Answer)

_____________ are the variables that receive the incoming values in a function.

  1. Actual parameters
  2. Function prototypes
  3. Formal parameters
  4. None of these
Question 5 Multiple Choice (Single Answer)

Which of the following operators are used to carry out the comparison among operands in C++?

  1. Arithmetic operators
  2. Logical operators
  3. Bitwise operators
  4. Relational operators
Question 6 Multiple Choice (Single Answer)

Which of the following is the correct form of C++ statement using C++ short hands and the C++ statement is x = x+7?

  1. x+7=x
  2. x+=7
  3. x+x=7
  4. None of these
Question 7 Multiple Choice (Single Answer)

Which of the following is the conditional operator in C++?

  1. ==
  2. <
  3. ?
  4. None of these
Question 8 Multiple Choice (Single Answer)

Which of the following statements in switch case is optional and, if not present, no action takes place if all matches fail?

  1. Case statement
  2. Default statement
  3. Break statement
  4. None of these
Question 9 Multiple Choice (Single Answer)

In C++, 'For loop' consists of condition in the ___________ expression.

  1. initialization
  2. update
  3. test
  4. none of these
Question 10 Multiple Choice (Single Answer)

Which of the following is the data type that associates integer constants to names?

  1. Derived data type
  2. Array
  3. Enumeration
  4. None of these
Question 11 Multiple Choice (Single Answer)

The process of containing objects of another class in a class is known as

  1. dynamic binding
  2. containership
  3. polymorphism
  4. inheritance
Question 12 Multiple Choice (Single Answer)

Which of the following functions is used to find the absolute value of any number given as an argument?

  1. ceil()
  2. floor()
  3. fabs()
  4. none of these
Question 13 Multiple Choice (Single Answer)

Which of the following data types in C++ shares the same memory location with one or more variables?

  1. Union
  2. Structure
  3. Pointer
  4. None of these
Question 14 Multiple Choice (Single Answer)

Which of the following variables is used in C++ for assigning alias name to a variable?

  1. Global variable
  2. Reference variable
  3. Local variable
  4. Static variable
Question 15 Multiple Choice (Single Answer)

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

  1. +
  2. -
  3. sizeof
  4. none of these
Question 16 Multiple Choice (Single Answer)

Which of the following is the pre-processor declarative statement in C++?

  1. #define statement
  2. const statement
  3. enum
  4. none of these
Question 17 Multiple Choice (Single Answer)

A constructor with arguments is called

  1. copy constructor
  2. parameterized constructor
  3. dynamic constructor
  4. none of these
Question 18 Multiple Choice (Single Answer)

____________ is the use of the same functional name to perform different task in C++.

  1. Operator overloading
  2. Function overloading
  3. Inheritance
  4. None of these
Question 19 Multiple Choice (Single Answer)

Which of the following is the looping structure in C++?

  1. If-else statement
  2. Switch statement
  3. While statement
  4. None of these
Question 20 Multiple Choice (Single Answer)

The function which is not in the scope of any class is called

  1. inline function
  2. static function
  3. friend function
  4. none of these
Question 21 Multiple Choice (Single Answer)

In which of the following forms of inheritance are base classes declared as 'Virtual'?

  1. Single inheritance
  2. Multi-level inheritance
  3. Multiple inheritance
  4. None of these
Question 22 Multiple Choice (Single Answer)

__________ is the scope of variable declared in the outermost block of a function.

  1. Local scope
  2. Function scope
  3. Class scope
  4. None of these
Question 23 Multiple Choice (Single Answer)

Which of the following is correct regarding 'Break' and 'Continue' statements that are used in C++?

  1. Both are same
  2. Both allow to exit from the loop
  3. One allows to exit from the loop and another skips the iteration
  4. None of these
Question 24 Multiple Choice (Single Answer)

Which of the following header files has to be included to make use of character function in C++?

  1. iostream.h
  2. ctype.h
  3. string.h
  4. iomanip.h
Question 25 Multiple Choice (Single Answer)

Which of the following visibilities in C++ could not be inherited either using public or private derivation?

  1. Protected
  2. Private
  3. Public
  4. None of these