Get the FREE certificate on C, C++, Java, Python, Perl, PHP, SQL, Linux & Javascript!  

CppBuzz.com
  
Home C C++ Java Python Perl PHP Spring SQL Javascript Linux

You are here : Home » C++ Objective Questions for Practitioners

C++ Objective Questions for Practitioners : 106 Questions


Question: 1

(A) Yes
(B) No
(C) Undefined
(D) Depends on Compiler

Practitioner datatype Compile it[Posted by: Admin | Chicago, USA]



Question: 2

(A) 5020--5020--
(B) 5020--7012020--12020--
(C) 5020--70120200--5020
(D) 5020--7050200--5020--

Practitioner function Compile it[Posted by: Admin | Chicago, USA]



Question: 3

(A) Error
(B) 5 times
(C) 4 times
(D) 6 times

Practitioner loops Compile it[Posted by: Admin | Chicago, USA]



Question: 4

(A) read()
(B) write()
(C) both A and B
(D) without read()

Practitioner operators Compile it[Posted by: Admin | Chicago, USA]



Question: 5

(A) *
(B) /
(C) %
(D) all have same precedence

Practitioner operators Compile it[Posted by: Admin | Chicago, USA]



Question: 6

(A) One
(B) Compilation Error
(C) Default
(D) OneTwoThree

Practitioner conditional Compile it[Posted by: Admin | Chicago, USA]



Question: 7

(A) A class with abstract keyword
(B) A class with no functions in it
(C) A class with atleast one pure virtual function
(D) Empty Class

Practitioner polymorphism Compile it[Posted by: Admin | Chicago, USA]



Question: 8

(A) 0
(B) 1
(C) 2
(D) 4

Practitioner datatype Compile it[Posted by: Admin | Chicago, USA]



Question: 9

(A) Yes
(B) No

Practitioner datatype Compile it[Posted by: Admin | Chicago, USA]



Question: 10

(A) Yes
(B) No

Practitioner datatype Compile it[Posted by: Admin | Chicago, USA]



Question: 11

(A) We cant have
(B) In different work space
(C) Can have but in different file
(D) We can have in any scenario

Practitioner datatype Compile it[Posted by: Admin | Chicago, USA]



Question: 12

(A) Yes
(B) No

Practitioner other Compile it[Posted by: Admin | Chicago, USA]



Question: 13

(A) It is not possible
(B) It is possible only with C code
(C) By using extern "C" keyword
(D) By Converting C++ code to C

Practitioner function Compile it[Posted by: Admin | Chicago, USA]



Question: 14

(A) Yes
(B) No

Practitioner abstract_class Compile it[Posted by: Admin | Chicago, USA]



Question: 15

(A) Yes
(B) No

Practitioner loops Compile it[Posted by: Admin | Chicago, USA]



Question: 16

(A) Yes
(B) No

Practitioner abstract_class Compile it[Posted by: Admin | Chicago, USA]



Question: 17

(A) Yes
(B) No

Practitioner classesAndobjects Compile it[Posted by: Admin | Chicago, USA]



Question: 18

(A) It contains VPTR
(B) It contains address of Virtual function
(C) It cotains address of Object
(D) None of these

Practitioner vtable Compile it[Posted by: Admin | Chicago, USA]



Question: 19

(A) Yes
(B) No

Practitioner classesAndobjects Compile it[Posted by: Admin | Chicago, USA]



Question: 20

(A) A pointer pointing to NULL
(B) Pointer pointing to memory location which has been freed
(C) Pointer which is pointing to new location
(D) None of these

Practitioner pointers Compile it[Posted by: Admin | Chicago, USA]



Question: 21

(A) Yes
(B) No

Practitioner virtual_func Compile it[Posted by: Admin | Chicago, USA]



Question: 22

(A) Yes
(B) No
(C) Depends on compiler

Practitioner virtual_func Compile it[Posted by: Admin | Chicago, USA]



Question: 23

(A) Yes
(B) No

Practitioner virtual_func Compile it[Posted by: Admin | Chicago, USA]



Question: 24

(A) Yes
(B) No

Practitioner virtual_func Compile it[Posted by: Admin | Chicago, USA]



Question: 25

(A) Yes
(B) No

Practitioner virtual_func Compile it[Posted by: Admin | Chicago, USA]



Question: 26

(A) Yes
(B) No

Practitioner stl Compile it[Posted by: Admin | Chicago, USA]



Question: 27

(A) AVL Tree
(B) Binary Tree
(C) Balance Binary Tree
(D) None of these

Practitioner stl Compile it[Posted by: Admin | Chicago, USA]



Question: 28

(A) Vector
(B) Deque
(C) Stack
(D) List

Practitioner stl Compile it[Posted by: Admin | Chicago, USA]



Question: 29

(A) We can create n number of object
(B) We can create max 256 objects
(C) We can create 1 object
(D) We cant create object

Practitioner classesAndobjects Compile it[Posted by: Admin | Chicago, USA]



Question: 30

(A) A
(B) B
(C) Both has are same
(D) Depends on Compiler

Practitioner other Compile it[Posted by: Admin | Chicago, USA]



Question: 31

(A) Structure which contains pointers
(B) Structure which has pointer to itself
(C) Structure which contains another structure
(D) None of these

Practitioner structure Compile it[Posted by: Admin | Chicago, USA]



Question: 32

(A) Hello
(B) Bye
(C) Undefined
(D) Compilation Error

Practitioner conditional Compile it[Posted by: Admin | Chicago, USA]



Question: 33

(A) 01
(B) 012
(C) 0
(D) 0123

Practitioner loops Compile it[Posted by: Admin | Chicago, USA]



Question: 34

(A) FiveSix
(B) Five
(C) Six
(D) None of these

Practitioner conditional Compile it[Posted by: Admin | Chicago, USA]



Question: 35

(A) c1=-7,c2=-4
(B) c1=-7,c2=-3
(C) c1=-4,c1=b-3
(D) c1=-6,c2=-6

Practitioner operators Compile it[Posted by: Admin | Chicago, USA]



Question: 36

(A) 1@2@
(B) 1@2@1@
(C) 1@1@2@
(D) 1@2@2@

Practitioner loops Compile it[Posted by: Admin | Chicago, USA]



Question: 37

(A) std::bad_typeid
(B) std::logic_error
(C) std::runtime_error
(D) std::bad_cast

Practitioner dynamic_cast Compile it[Posted by: Admin | Chicago, USA]



Question: 38

(A) std::bad_exception
(B) std::logic_error
(C) std::exception
(D) std::runtime_error

Practitioner exceptions Compile it[Posted by: Admin | Chicago, USA]



Question: 39

(A) .exe
(B) .out
(C) .lib
(D) .a

Practitioner other Compile it[Posted by: Admin | Chicago, USA]



Question: 40

(A) IS-A relation
(B) HAS-A relation
(C) None of these

Practitioner classesAndobjects Compile it[Posted by: Admin | Chicago, USA]



Question: 41

(A) Yes
(B) No
(C) Depends on compiler
(D) None of these

Practitioner other Compile it[Posted by: Admin | Chicago, USA]



Question: 42

(A) ASM
(B) asm
(C) Not possible
(D) Compiler specific

Practitioner other Compile it[Posted by: Admin | Chicago, USA]



Question: 43

(A) Hey..
(B) CppBuzz.com
(C) Compilation Error
(D) None of these

Practitioner conditional Compile it[Posted by: Admin | Chicago, USA]



Question: 44

(A) 1 Million +
(B) 2 Million +
(C) 3 Million +
(D) 4 Million +

Practitioner other Compile it[Posted by: Admin | Chicago, USA]



Question: 45

(A) True
(B) False

Practitioner other Compile it[Posted by: | Chicago, USA]



Question: 46

(A) do
(B) sizeof()
(C) goto
(D) sqrt()

Practitioner keyword Compile it[Posted by: Admin | Chicago, USA]



Question: 47

(A) pragma
(B) override
(C) wchar_t
(D) mutable

Practitioner cpp11 Compile it[Posted by: Admin | Chicago, USA]



Question: 48

(A) It makes variable constant
(B) There is no such keyword in C++
(C) It allows a class data member to be modified even though it is the data member of a const object
(D) None of these

Practitioner keyword Compile it[Posted by: Admin | Chicago, USA]



Question: 49

(A) It saves the memory
(B) It runs code faster by allocating varibales in CPU register
(C) It takes extra bytes of memory
(D) Register variable are used with high configuration machines

Practitioner keyword Compile it[Posted by: Admin | Chicago, USA]



Question: 50

(A) Yes
(B) No

Practitioner keyword Compile it[Posted by: Admin | Chicago, USA]



Question: 51

(A) It is volatile because it can change at any time
(B) It is const because our C program must not try to modify it
(C) Change value outside by means outside our C program
(D) All of these

Practitioner keyword Compile it[Posted by: Admin | Chicago, USA]



Question: 52

(A) It saves memory
(B) It releases memory once it go out of scope
(C) It inrease execution time of program
(D) None of these

Practitioner other Compile it[Posted by: Admin | Chicago, USA]



Question: 53

(A) ios::trunc
(B) ios::ate
(C) ios::app
(D) ios::tellg

Practitioner other Compile it[Posted by: Admin | Chicago, USA]



Question: 54

(A) blue
(B) 2
(C) 1
(D) None of these

Practitioner enum Compile it[Posted by: Admin | Chicago, USA]



Question: 55

(A) blue
(B) Compilation Error
(C) 1
(D) 2

Practitioner enum Compile it[Posted by: Admin | Chicago, USA]



Question: 56

(A) yellow
(B) black
(C) Compilation Error
(D) 3

Practitioner enum Compile it[Posted by: Admin | Chicago, USA]



Question: 57

(A) black
(B) 0
(C) -1
(D) Some Garbage Value

Practitioner enum Compile it[Posted by: Admin | Chicago, USA]



Question: 58

(A) 0
(B) 1
(C) 2
(D) 4

Practitioner enum Compile it[Posted by: Admin | Chicago, USA]



Question: 59

(A) Compilation Error
(B) 0
(C) 1
(D) -4

Practitioner enum Compile it[Posted by: Admin | Chicago, USA]



Question: 60

(A) 128
(B) 256
(C) 1024
(D) None of the above

Practitioner structure Compile it[Posted by: Admin | Chicago, USA]



Question: 61

(A) int
(B) float
(C) class
(D) enum

Practitioner structure Compile it[Posted by: Admin | Chicago, USA]



Question: 62

(A) Yes
(B) No

Practitioner structure Compile it[Posted by: Admin | Chicago, USA]



Question: 63

(A) Yes
(B) No

Practitioner structure Compile it[Posted by: Admin | Chicago, USA]



Question: 64

(A) :?
(B) ::
(C) ->
(D) .

Practitioner namespace Compile it[Posted by: Admin | Chicago, USA]



Question: 65

(A) namespace::a
(B) namesspace.a
(C) namespace->a
(D) namespace:a

Practitioner namespace Compile it[Posted by: Admin | Chicago, USA]



Question: 66

(A) ios :: out
(B) ios :: app
(C) ios :: in
(D) ios::end

Practitioner filehandling Compile it[Posted by: Admin | Chicago, USA]



Question: 67

(A) Moves get pointer (input) to a specified location
(B) Moves put pointer (output) to a specified location
(C) Gives the current position of the get pointer
(D) Gives the current position of the put pointer

Practitioner filehandling Compile it[Posted by: Admin | Chicago, USA]



Question: 68

(A) Moves get pointer (input) to a specified location
(B) Moves put pointer (output) to a specified location
(C) Gives the current position of the get pointer
(D) Gives the current position of the put pointer

Practitioner filehandling Compile it[Posted by: Admin | Chicago, USA]



Question: 69

(A) Moves get pointer (input) to a specified location
(B) Moves put pointer (output) to a specified location
(C) Gives the current position of the get pointer
(D) Gives the current position of the put pointer

Practitioner loops Compile it[Posted by: Admin | Chicago, USA]



Question: 70

(A) Gives the current position of the put pointer
(B) Gives the current position of the get pointer
(C) Moves put pointer (output) to a specified location
(D) Moves get pointer (input) to a specified location

Practitioner filehandling Compile it[Posted by: Admin | Chicago, USA]



Question: 71

(A) QT
(B) SDL
(C) WxWidget
(D) Bootstrap

Practitioner other Compile it[Posted by: Admin | Chicago, USA]



Question: 72

(A) 9876543210
(B) 987654321
(C) 9
(D) 0

Practitioner loops Compile it[Posted by: Admin | Chicago, USA]



Question: 73

(A) 0
(B) 1
(C) 2
(D) error

Practitioner classesAndobjects Compile it[Posted by: Rohit Iparkar | Pune]



Question: 74

(A) std::vector<integer> vecOfInts;
(B) std::vector int <vecOfInts>
(C) std::vector(int) vecOfInts;
(D) std::vector<int> vecOfInts;

Practitioner stl Compile it[Posted by: Admin | Chicago, USA]



Question: 75

(A) Initialize a Vector with 5 int & all default value is 0
(B) Initialize a Vector with 5 int
(C) Initialize a Vector with 5 int & all default values will be garbage
(D) Initialize a Vector with 5 int & All default value with be -1

Practitioner stl Compile it[Posted by: Admin | Chicago, USA]



Question: 76

(A) Yes
(B) No

Practitioner stl Compile it[Posted by: Admin | Chicago, USA]



Question: 77

(A) Yes
(B) No

Practitioner stl Compile it[Posted by: Admin | Chicago, USA]



Question: 78

(A) 1 2 3 4
(B) 1234
(C) 12340
(D) 01234

Practitioner stl Compile it[Posted by: Admin | Chicago, USA]



Question: 79

(A) Initialize vect to 5 string with value "Hi"
(B) Initialize vect's first element to a string with value "Hi" & prints them
(C) Initialize vect to 1 string with value "Hi" & prints only one
(D) Initialize vect to 5 string with value "Hi" & prints them

Practitioner stl Compile it[Posted by: Admin | Chicago, USA]



Question: 80

(A) file.open(“c:filename.txt”);
(B) open(afile) = link(anObject);
(C) linkstream(“filenemae.txt”)
(D) link(open(filename.txt);

Practitioner filehandling Compile it[Posted by: Andrew | New Jersey]



Question: 81

(A) TRUE
(B) FALSE

Practitioner filehandling Compile it[Posted by: Andrew | New Jersey]



Question: 82

(A) At the end of the file
(B) At the beginning of the file
(C) Nonexistent until the program declares it
(D) There is no read position

Practitioner filehandling Compile it[Posted by: Andrew | New Jersey]



Question: 83

(A) The programs runs with no output
(B) 77
(C) Hello!
(D) Hello!

Practitioner classesAndobjects Compile it[Posted by: Andrew | New Jersey]



Question: 84

(A) True
(B) False

Practitioner classesAndobjects Compile it[Posted by: Andrew | New Jersey]



Question: 85

(A) #include
(B) #guard
(C) #ifndef
(D) endif

Practitioner other Compile it[Posted by: Andrew | New Jersey]



Question: 86

(A) True
(B) False

Practitioner operators Compile it[Posted by: Andrew | New Jersey]



Question: 87

(A) re-assigned
(B) reformatted
(C) constructed
(D) overloaded

Practitioner operators Compile it[Posted by: Andrew | New Jersey]



Question: 88

(A) True
(B) False

Practitioner operators Compile it[Posted by: Andrew | New Jersey]



Question: 89

(A) True
(B) False

Practitioner classesAndobjects Compile it[Posted by: Andrew | New Jersey]



Question: 90

(A) static
(B) auto
(C) exterb
(D) register

Practitioner classesAndobjects Compile it[Posted by: Andrew | New Jersey]



Question: 91

(A) Static function
(B) constructor
(C) destructor
(D) friend

Practitioner function Compile it[Posted by: Andrew | New Jersey]



Question: 92

(A) Any time you read or write to the file
(B) Never
(C) Only when reading from the file
(D) When opening the file stream

Practitioner filehandling Compile it[Posted by: Andrew | New Jersey]



Question: 93

(A) True
(B) False

Practitioner operators Compile it[Posted by: Andrew | New Jersey]



Question: 94

(A) True
(B) False

Practitioner classesAndobjects Compile it[Posted by: Andrew | New Jersey]



Question: 95

(A) True
(B) False

Practitioner pointers Compile it[Posted by: Andrew | New Jersey]



Question: 96

(A) Polymorphism
(B) Inheritance
(C) Function overloading
(D) None of these

Practitioner inheritance Compile it[Posted by: Andrew | New Jersey]



Question: 97

(A) virtual
(B) private
(C) public
(D) protected

Practitioner virtual_func Compile it[Posted by: Andrew | New Jersey]



Question: 98

(A) True
(B) False

Practitioner virtual_func Compile it[Posted by: Andrew | New Jersey]



Question: 99

(A) True
(B) False

Practitioner virtual_func Compile it[Posted by: Andrew | New Jersey]



Question: 100

(A) True
(B) False

Practitioner vtable Compile it[Posted by: Admin | Chicago, USA]



Question: 101

(A) True
(B) False

Practitioner typecasting Compile it[Posted by: Admin | Chicago, USA]



Question: 102

(A) True
(B) False

Practitioner typecasting Compile it[Posted by: Admin | Chicago, USA]



Question: 103

(A) True
(B) False

Practitioner typecasting Compile it[Posted by: Admin | Chicago, USA]



Question: 104

(A) True
(B) False

Practitioner typecasting Compile it[Posted by: Admin | Chicago, USA]



Question: 105

(A) True
(B) False

Practitioner typecasting Compile it[Posted by: Admin | Chicago, USA]



Question: 106

(A) True
(B) False

Practitioner typecasting Compile it[Posted by: Admin | Chicago, USA]


Compile C++ code here  |  Upload your Questions

C++ Objective Questions By Different Categories:-
Loops | Conditional | Functions | Operators | Structure | Enum | Storage Classes | Union | FileHandling | Data Types | Inheritance | Pointers | Classes & Objects | Vtable | Type Casting | New & Delete | Namespaces | Reference Variables | Static Cast | Dynamic Cast | Reinterpret Cast | Const Cast | Virtual Functions | Abstract Class | STL | Singleton Class | C++ 11 | C++ 14 | C++ 17 | C++ 20 | gcc/g++ | others

Switch to C Questions