Explore topic-wise MCQs in Testing Subject.

This section includes 657 Mcqs, each offering curated multiple-choice questions to sharpen your Testing Subject knowledge and support exam preparation. Choose a topic below to get started.

1.

An exception is caught based on its ..............

A. keyword
B. address
C. type
D. pointer
Answer» D. pointer
2.

The functions that are used to access the file in non-sequential fashion ............... and ...................

A. seekf() , seekp()
B. seekg(), seekp()
C. seekp(), seekf()
D. beg(), seekx()
Answer» C. seekp(), seekf()
3.

The control automatically passes to the first statement after the loop in

A. continue statement
B. break statement
C. switch statement
D. if statement
Answer» C. switch statement
4.

The loop in which the statements within the loop are executed at least once is called

A. do-while
B. while
C. for
D. goto
Answer» B. while
5.

................ is a stream connected to standard output.

A. cin
B. gets
C. out
D. cout
Answer» E.
6.

................. is a unary operator that returns the memory address of its operand.

A. &
B. ++
C. _ _
D. ||
Answer» B. ++
7.

The inherited member access specification is to employ ................. within the derived class.

A. class declaration
B. private declaration
C. public declaration
D. access declaration
Answer» E.
8.

The keyword virtual precedes the inherited ................ specification.

A. class
B. variable
C. array
D. pointer
Answer» B. variable
9.

The number of arguments supplied from the command line, by convention, is known as

A. arg c
B. arg v
C. #define
D. #include
Answer» B. arg v
10.

A variable which is visible only in the function in which it is defined, is called

A. static variable
B. auto variable
C. external variable
D. local variable
Answer» E.
11.

The statement that transfers control to the beginning of the loop is called

A. break statement
B. exit statement
C. continue statement
D. goto statement
Answer» D. goto statement
12.

The class that acquires the properties of parent class is called .................. class.

A. base
B. inherited
C. derived
D. public
Answer» D. public
13.

The -> pointer operator is also called as ...............

A. class member access
B. loc::operator
C. element
D. object
Answer» B. loc::operator
14.

The ............... function receives the pointer to the region of memory to be free.

A. new
B. delete
C. free
D. alloc
Answer» C. free
15.

.............. function is not a member of the class which does not have "this" pointer.

A. Inline
B. Friend
C. Member
D. Void
Answer» C. Member
16.

................... must be predefined in the C++ compiler

A. Keywords
B. Variables
C. Identifiers
D. Operators
Answer» E.
17.

............... is used to prevent problems when one object is used to initialize others.

A. Default Constructor
B. Parameterized Constructor
C. Copy Constructor
D. Overloading Operator
Answer» D. Overloading Operator
18.

................ is the process of using the same name for two or more functions.

A. Function Overloading
B. Operator Overloading
C. Default Function
D. Constructors
Answer» B. Operator Overloading
19.

A .............. is an alias or synonym for another variable.

A. reference
B. structure
C. pointer
D. array
Answer» B. structure
20.

............... function is a function that calls itself repeatedly.

A. friend
B. inline
C. recursive
D. member
Answer» D. member
21.

A ................ defines a class type.

A. structure
B. union
C. enumeration
D. type def
Answer» B. union
22.

................ members are public by default and fully compatible.

A. Protected
B. Private
C. Enum
D. Union
Answer» E.
23.

................... is automatically created when constructors are used.

A. Objects
B. Destructors
C. Arrays
D. Reference
Answer» C. Arrays
24.

Which of the following is FALSE in C

A. Keywords can be used as variable names
B. Variable names can contain a digit
C. Variable names do not contain a blank space
D. Capital letters can be used in variable names
Answer» B. Variable names can contain a digit
25.

How many times the following loop be executed { … ch = ‘b’; while(ch >= ‘a’ && ch

A. 0
B. 25
C. 26
D. 1
Answer» C. 26
26.

The machine registers are sometimes called

A. local variables
B. global variables
C. accumulators
D. static variables
Answer» B. global variables
27.

The statement which is used to terminate the control from the loop is

A. break
B. continue
C. goto
D. exit
Answer» B. continue
28.

The value that follows the keyword CASE may only be

A. constants
B. variable
C. number
D. semicolon
Answer» B. variable
29.

Which of the following is not true in type conversions?

A. The value of RHS is assignment is converted to the type of LHS.
B. When converting from a floating point type to an integer the fractional part will be lost.
C. When constants and variables of different types are mixed in an expression, they are converted to the same type.
D. The conversion from a char to a double is invalid.
Answer» E.
30.

The specification of the number 100 as long int is .............

A. L100
B. 100
C. 100L
D. 100l
Answer» D. 100l
31.

............ is the escape sequence that causes a backspace.

A.
B. s
C. s
D. a
Answer» B. s
32.

The ............... type specifies a valueless expression.

A. int
B. float
C. bool
D. void
Answer» E.
33.

The primary difference between float and double is in the ............. of the value they hold

A. address
B. magnitude
C. sign
D. decimal point
Answer» C. sign
34.

A/An ............. integer can hold both positive and negative values.

A. unsigned
B. positive
C. negative
D. signed
Answer» E.
35.

Which one of the following is invalid variable name?

A. 1count
B. count
C. counta
D. count_a
Answer» B. count
36.

.............. is the output operator.

A. >>
B. <
C. >
D. <<
Answer» E.
37.

To what device is cin linked by default?

A. printer
B. keyboard
C. CPU
D. mouse
Answer» C. CPU
38.

Which one of the following is correct assignment of the variable min to zero?

A. min = = 0;
B. min =+ 0
C. min = 0;
D. min ++ 0
Answer» D. min ++ 0
39.

............... is initialized when an object is created.

A. Constructor
B. Destructor
C. Array
D. Pointer
Answer» B. Destructor
40.

................ function allows creating very efficient code.

A. Friend
B. Member
C. Inline
D. Void
Answer» D. Void
41.

A .............. function has access to all private and protected members of the class for which it is a friend.

A. friend
B. member
C. non-member
D. void
Answer» B. member
42.

A .............. is an object that contains memory address.

A. constructor
B. destructor
C. pointer
D. temp
Answer» D. temp
43.

................. is an implicit parameter to all member functions.

A. Pointer
B. This
C. Enum
D. Array
Answer» C. Enum
44.

The ............... function will sort any type of array.

A. tab()
B. tab out()
C. sort()
D. bubble()
Answer» E.
45.

The .................. parameter is a standard call by value parameter.

A. tabout()
B. tab
C. out
D. tabout
Answer» C. out
46.

The function ................ displays its first argument at the tab position requested by its argument.

A. tab
B. out
C. tabout
D. tab( )
Answer» D. tab( )
47.

The ................ defines a general set of operation that will be applied to various types of data.

A. generic function
B. member function
C. function overloading
D. operator overloading
Answer» B. member function
48.

The ............... is used to create generic function and classes.

A. class
B. template
C. specifier
D. identifier
Answer» C. specifier
49.

................ is the elements of a class that are called member or data member.

A. Pointer
B. Variable
C. Character
D. Identifier
Answer» C. Character
50.

A ................. access specifier is needed only when inheritance is involved.

A. public
B. Private
C. protected
D. automatic
Answer» D. automatic