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
Can you use the function fprintf() to display the output on the screen?
What are the various storage classes in C++?
What is meant by const_cast?
Tell me an example where stacks are useful?
When does a name clash occur in c++?
Differentiate between the message and method in c++?
Is it possible to have a recursive inline function in c++?
What do you mean by persistent and non persistent objects?
What is a constructor and how is it called?
Name the implicit member functions of a class.
Explain the advantages of using friend classes.
Snake Game: This is normal snake game which you can find in most of the mobiles. You can develop it in Java, C/C++, C# or what ever language you know.
What does extern mean in a function declaration in c++?
What are the stages in the development cycle?
How is objective c different from c++?