I have a function declaration like this(in C/C++).const int f(int* a){ ..... // Do something here return *a; }what is the purpose of the keyword const here?
It is just a fancy keyword, No purpose here
Prevents the compiler from assigning the function as an rvalue
Prevents the compiler from assigning the function as an lvalue
It makes sure that the return value is a const and is not changed by anyone else