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 are the main characteristics of C++ as a programming language?
What is protected inheritance?
What problem does the namespace feature solve?
What is a virtual destructor?
Which software is used for c++ programming?
Write about the use of the virtual destructor?
What is the difference in size of this two clasees? Class A { int a; char c; float f; } Class B { float f; char c; int a; }
write the code that display the format just like 1 2 1 3 2 1 4 3 2 1 5 4 3 2 1 6 5 4 3 2 1
Write about a nested class and mention its use?
Write a c program for binary addition of two 8 bit numbers.
What is microsoft c++ redistributable?
Write a program to find the Factorial of a number