How const functions will be treated by compiler?
Answer Posted / achal ubbott
A member function can be const qualified. e.g.
class SAAMPLE
{
int m1;
void f() const;
}
Now function f will not be able to modify the value of data
members. If so done the compiler would report an error.
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
Is c++ a float?
How many keywords are used in c++?
Why isn't sizeof for a struct equal to the sum of sizeof of each member?
What are member functions used in c++?
Which c++ operator cannot overload?
What is std :: flush?
What does new return if there is insufficient memory to make your new object?
What is wrapper class in c++?
What is size of string in c++?
Should the member functions which are made public in the base class be hidden?
What is array in c++ pdf?
What are the various storage classes in C++?
Tell me can a pure virtual function have an implementation?
What is general format for a prototype?
What is data types c++?