Interviewer And Interviewee Guide

C++ Inline Function Interview Question:

Explain what are static member functions?

Submitted by: Administrator
Static member functions are used to maintain a single copy of a class member function across various objects of the class. Static member functions can be called either by itself, independent of any object, by using class name and :: (scope resolution operator) or in connection with an object.

Restrictions on static member functions are:
1. They can directly refer to other static members of the class.
2. Static member functions do not have this pointer.
3. Static member function can not be virtual.
Submitted by: Administrator

Read Online C++ Inline Function Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.