How const functions will be treated by compiler?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / window
Question is "How const functions will be treated by
compiler?" you guys answered the question "What do you now
about const functions?"
Please do not write what you know. Because of answers like
this, questions in websites are becoming obsolete.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / anil
it not allow to change value of the const variable.
| Is This Answer Correct ? | 0 Yes | 3 No |
What is the difference between an enumeration and a set of pre-processor # defines?
How c functions prevents rework and therefore saves the programers time as wel as length of the code ?
can output 5 students using one dimensional array
How do you find out if a linked-list has an end?
Why do we use iterators?
Explain how the virtual base class is different from the conventional base classes of the opps.
What is the difference between a declaration and a definition?
What is the full form of ios?
What are the different types of Storage classes?
Write a struct time where integer m, h, s are its members?
What are Binay tress and B trees? Diff between them?
Write a program using display() function which takes two arguments.