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.
Questions
Which of the following types of functions in C++ perform an action and have no explicit return value?
- Computational functions
- Manipulative functions
- Procedural functions
- None of these
Which of the following conversions is known as user-defined type conversion in C++?
- Explicit type conversion
- Implicit type conversion
- Type promotion conversion
- None of these
Which of the following functions is used in C++ to convert its arguments to uppercase letters if the argument is a letter?
- isupper()
- tolower()
- isalnum()
- toupper()
_____________ are the variables that receive the incoming values in a function.
- Actual parameters
- Function prototypes
- Formal parameters
- None of these
Which of the following operators are used to carry out the comparison among operands in C++?
- Arithmetic operators
- Logical operators
- Bitwise operators
- Relational operators
Which of the following is the correct form of C++ statement using C++ short hands and the C++ statement is x = x+7?
- x+7=x
- x+=7
- x+x=7
- None of these
Which of the following is the conditional operator in C++?
- ==
- <
- ?
- None of these
Which of the following statements in switch case is optional and, if not present, no action takes place if all matches fail?
- Case statement
- Default statement
- Break statement
- None of these
In C++, 'For loop' consists of condition in the ___________ expression.
- initialization
- update
- test
- none of these
Which of the following is the data type that associates integer constants to names?
- Derived data type
- Array
- Enumeration
- None of these
The process of containing objects of another class in a class is known as
- dynamic binding
- containership
- polymorphism
- inheritance
Which of the following functions is used to find the absolute value of any number given as an argument?
- ceil()
- floor()
- fabs()
- none of these
Which of the following data types in C++ shares the same memory location with one or more variables?
- Union
- Structure
- Pointer
- None of these
Which of the following variables is used in C++ for assigning alias name to a variable?
- Global variable
- Reference variable
- Local variable
- Static variable
Which of the following operators cannot be overloaded in C++?
- +
- -
- sizeof
- none of these
Which of the following is the pre-processor declarative statement in C++?
- #define statement
- const statement
- enum
- none of these
A constructor with arguments is called
- copy constructor
- parameterized constructor
- dynamic constructor
- none of these
____________ is the use of the same functional name to perform different task in C++.
- Operator overloading
- Function overloading
- Inheritance
- None of these
Which of the following is the looping structure in C++?
- If-else statement
- Switch statement
- While statement
- None of these
The function which is not in the scope of any class is called
- inline function
- static function
- friend function
- none of these
In which of the following forms of inheritance are base classes declared as 'Virtual'?
- Single inheritance
- Multi-level inheritance
- Multiple inheritance
- None of these
__________ is the scope of variable declared in the outermost block of a function.
- Local scope
- Function scope
- Class scope
- None of these
Which of the following is correct regarding 'Break' and 'Continue' statements that are used in C++?
- Both are same
- Both allow to exit from the loop
- One allows to exit from the loop and another skips the iteration
- None of these
Which of the following header files has to be included to make use of character function in C++?
- iostream.h
- ctype.h
- string.h
- iomanip.h
Which of the following visibilities in C++ could not be inherited either using public or private derivation?
- Protected
- Private
- Public
- None of these