C++ Programming Fundamentals
Comprehensive quiz covering C++ programming basics including OOP concepts, data structures, operators, stream I/O, and standard library functions
Questions
Which of the following data types is a collection of different data types referenced under one name?
- Enumeration
- Union
- Structure
- None of these
Which of the following is also called 'manipulator' in C++?
- endl
- const
- malloc()
- none of these
Which of the following is the exit controlled statement in C++?
- For loop
- Do-while loop
- While loop
- None of these
Which of the following stream classes supports output functions: put() and write()?
- istream
- ostream
- streambuf
- none of these
Which of the following container classes allows the random access iteration permitting direct access to any element?
- Deque
- List
- Set
- None of these
Which of the following members of a class can neither be inherited in public mode nor in private mode?
- Protected
- Public
- Private
- None of these
Which of the following methods is used to achieve run-time polymorphism in C++?
- Function overloading
- Virtual function
- Operator overloading
- None of these
Which of the following functions of vector class gives current capacity of the vector?
- begin()
- clear()
- capacity()
- none of these
Which of the following operators in C++ cannot be overloaded?
- '<'
- '?:'
- '>'
- None of these
Which of the following functions is used to perform operator overloading in C++?
- Inline function
- Operator function
- Virtual function
- None of these
Which of the following properties of C++ bounds functions to the code to be executed at compile time?
- Dynamic binding
- Late binding
- Static binding
- None of these
Which of the following methods is used to give a new name to an existing data type in C++?
- typeid
- typedef
- typename
- none of these
Which of the following translates the software requirements into specifications for objects, and derives class hierarchies from which the objects can be created?
- Object oriented design
- Object oriented analysis
- Object oriented programming
- None of these
Which of the following menus in visual C++ compiles the source code in the active window and builds an executable file?
- View
- Build
- Tools
- Edit
Which of the following storage class specifiers informs the compiler that the variable so declared is defined in another source file?
- Auto
- Enumeration
- Extern
- None of these
Which of the following properties of C++ refers to putting together essential features without including background details?
- Inheritance
- Polymorphism
- Data abstraction
- None of these
Which of the following functions is used in C++ for the automatic initialization of class objects?
- Destructor
- Virtual function
- Constructor
- None of these
Which of the following operators has the highest precedence among other operators supported by C++?
- &&(logical AND)
- +(unary plus)
- ==(equal to )
- None of these
Which of the following mathematical functions returns tangent of the arguement in radians?
- tanh()
- sin()
- tan()
- none of these
Which of the following forms of inheritance occurs when the properties of one class are inherited by more than one class, forming a hierarchy of class?
- Multilevel inheritance
- Multiple inheritance
- Hierarchical inheritance
- None of these
We can create infinite loop in C++ by omitting the ______________ expression.
- initialization
- test
- update
- none of these
Which of the following error handling functions returns true when an input or output operation has failed?
- eof()
- fail()
- bad()
- none of these
Which of the following library functions is used in C++ to break out of the program, abandoning the rest of the execution of the program?
- break
- exit()
- go to
- none of these
Which of the following header files provides a set of manipulator functions to manipulate output formats?
- iostream.h
- iomanip.h
- conio.h
- string.h
Which of the following 'ios format functions' specifies format flags that can control the form of output display?
- width()
- precision()
- setf()
- none of these