InterviewSolution
Saved Bookmarks
| 1. |
If a function is to be made const, which is the correct syntax?(a) const functionName(parameters);(b) const returnType functionName(parameters);(c) const functionName(returnType)(Parameters);(d) const (functionName(parameters));This question was addressed to me in an interview.This question is from Constant Member Functions in division Member Functions & its Types of Object Oriented Programming |
|
Answer» Right option is (b) const RETURNTYPE FUNCTIONNAME(parameters); |
|