Basic C++ Interview Question and Answers

11. How many types of variable scopes are there?
 
    Scope refers to the accessibility of a variable. There are four types of scopes in C++.
  • Local scope
  • File scope
  • Function scope
  • Class scope
 
Your Name Your Email-ID
Your Answer
12. What is an assignment operator?
  An assignment statement, assigns value on the right hand side of an expression to the variable on the left hand side of the assignment operator.
= is the assignment operator.
 
Your Name Your Email-ID
Your Answer
13. How is polymorphism achieved?
  Polymorphism is achieved through function overloading and operator overloading.
 
Your Name Your Email-ID
Your Answer
14. What is break statement?
  A loop's execution is terminated when the test condition evaluates to false. Under certain situations one desires to terminate the loop, irrespective of the test expression.
 
Your Name Your Email-ID
Your Answer
15. What is an operator and an operand?
  Operator specifies an operation to be performed that yields a value.
An operand is an entity on which an operator acts.
 
Your Name Your Email-ID
Your Answer
12345 Page 3 of 5