0% found this document useful (0 votes)
70 views5 pages

Abax Techno Solutions - C++ Interview Questions

The document contains 20 C++ interview questions related to topics like header files, constructors, data types, comments, libraries, RTTI, exceptions, containers, operators, and functions. The questions test knowledge of basic C++ syntax and concepts like inclusion of header files, constructor types, return values, identifiers, pointers, iterators, comments, data types, modularization, exceptions, containers, reference capture, constructors, and passing arrays to functions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views5 pages

Abax Techno Solutions - C++ Interview Questions

The document contains 20 C++ interview questions related to topics like header files, constructors, data types, comments, libraries, RTTI, exceptions, containers, operators, and functions. The questions test knowledge of basic C++ syntax and concepts like inclusion of header files, constructor types, return values, identifiers, pointers, iterators, comments, data types, modularization, exceptions, containers, reference capture, constructors, and passing arrays to functions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

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

2) Which of the following user-defined header file extension used in c++?

a) hg

b) cpp

c) h

d) hf

Answer: c

3) Which of the following is not a type of Constructor in C++?

a) Default constructor

b) Parameterized constructor

c) Copy constructor

d) Friend constructor

Answer: d

4) Which of these won’t return any value?

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

6) What is used for dereferencing?

a. pointer with asterix

b. pointer without asterix

c. value with asterix

d. value without asterix

Answer: (a)

7) In heap, which of these values will be pointed out first?

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

d) both // comment or /* comment */

Answer: d

10) Which concept do we use for the implementation of late binding?

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)

12) We can apply RTTI to which of the class types?

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)

14) Which of these types is not provided by C but is provided by C++?

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)

16) What do we use in order to throw an exception?

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)

You might also like