How const functions will be treated by compiler?

Answers were Sorted based on User's Feedback



How const functions will be treated by compiler?..

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

How const functions will be treated by compiler?..

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

How const functions will be treated by compiler?..

Answer / anil

it not allow to change value of the const variable.

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More C++ General Interview Questions

What is a hashmap c++?

0 Answers  


can output 5 students using one dimensional array

1 Answers   Intel,


What is design pattern?

2 Answers   Samsung,


Can you think of a situation where your program would crash without reaching the breakball, which you set at the beginning of main()?

1 Answers  


How can I disable the "echo" feature?

0 Answers  






Write a program that read 2o numbers in and array and output the second largest number. Can anybody help??

7 Answers  


If there are two catch statements, one for base and one for derived, which should come first?

0 Answers  


What is c++ library?

0 Answers  


Which software is best for c++ programming?

0 Answers  


How do you initialize a string in c++?

0 Answers  


Can I uninstall microsoft c++ redistributable?

0 Answers  


what is the use of void main() in C++ language?

0 Answers  


Categories