Abax Techno Solutions - C++ Interview Questions
Abax Techno Solutions - C++ Interview Questions
1) Which of the following is the correct syntax of including a user defined header files in C++?
a) #include [userdefined]
b) #include “userdefined”
c) #include <userdefined.h>
d) #include <userdefined>
Answer: b
a) hg
b) cpp
c) h
d) hf
Answer: c
a) Default constructor
b) Parameterized constructor
c) Copy constructor
d) Friend constructor
Answer: d
a. void
b. null
c. free
d. empty
Answer: (a)
5) Which of the following is a correct identifier in C++?
a) VAR_1234
b) $var name
c) 7VARNAME
d) 7var_name
Answer: a
Answer: (a)
a. First value
b. Lowest value
c. Third value
d. Highest value
Answer: (d)
8) Which of these functions is used for incrementing the iterator by a certain value?
a. move()
b. prev()
c. advance()
d. next()
Answer: (c)
9) Which of the following is used for comments in C++?
a) /* comment */
b) // comment */
c) // comment
Answer: d
a. Static Functions
b. Constant Functions
c. Operator Functions
d. Virtual Functions
Answer: (d)
11) Which of these mathematics libraries is used in C++ for vector manipulation?
a. blitz++
b. stac++
c. vec++
d. cli+++
Answer: (a)
a. Polymorphic
b. Encapsulation
c. Static
d. Derived
Answer: (a)
13) Which function do we use for checking if a character is a space or a tab?
a. isdigit()1
b. isblank()
c. isalnum()
d. isalpha()
Answer: (b)
a. double
b. float
c. bool
d. int
Answer: (c)
15) __________ is an ability of grouping certain lines of code that we need to include in our program?
a. macros
b. modularization
c. program control
d. specific task
Answer: (b)
a. try
b. throw
c. handler
d. catch
Answer: (b)
17) Which container is the best for keeping a collection of various distinct elements?
a. queue
b. set
c. heap
d. multimap
Answer: (b)
18) Which of these operators is used in order to capture every external variable by reference?
a. *
b. &&
c. &
d. =
Answer: (d)
19) Class function which is called automatically as soon as the object is created is called as __
A - Constructor
B - Destructor
C - Friend function
D - Inline function.
Answer: (a)
20)An array can be passed to the function with call by value mechanism.
A - True
B - False
Answer: (b)