Basic C++ Interview Question and Answers

16. What data types can be used in two dimensional arrays?
 
    The dimensions of an array can be indicated.
  • Using integer constants.
  • Using char constants.
  • Using enum identifiers.
  • Using const identifier of integer or ordinal.
 
Your Name Your Email-ID
Your Answer
17. What is operator overloading?
  The mechanism overloading, refers to giving additional functionality to the normal C++ operators like +, ++, -, --, +=, -=, <,>.
 
Your Name Your Email-ID
Your Answer
18. What is the use of parameters passing in functions?
  The call statements communicates with the function through arguments or parameters.
Parameters are the channels through which data flows from call statement to function and vice versa.
 
Your Name Your Email-ID
Your Answer
19. What is a derived class and base class?
  A base class is a class from which other classes are derived. A derived class can inherit members of a base class.
 
Your Name Your Email-ID
Your Answer
20. What are the advantages of operator overloading?
  We can give additional functionality to the normal C++ operators like +, -,x, /, ++, -- etc.
We can use operator overloading to add or substract two strings or to add two complex numbers or to add two matrices etc. with usual addition and subtraction notatison.
Along with new functionality to the operator, we can also use the original definition of the operator.
 
Your Name Your Email-ID
Your Answer
12345 Page 4 of 5