InterviewSolution
Saved Bookmarks
| 1. |
Which keyword should be used to declare the static member functions?(a) static(b) stat(c) const(d) commonThe question was asked in an interview for job.My question comes from Static Member Functions in portion Exception Handling & Static Class Members of Object Oriented Programming |
|
Answer» RIGHT answer is (a) static Easy explanation - The member functions which are to be made static, must be preceded with the keyword static. This INDICATES the compiler to make the functions common to all the objects. And a new COPY is not created with each of the new OBJECT. |
|