When both the const and non-const version of functions are required?

When both the const and non-const version of functions are required? Correct Answer Return value have to be different in const

The return values can help to overload the functions. Also, this will allow us to use a non-const function to be called inside both the const and non-const version of functions.

Related Questions

How is it possible to have both const and non-const version of a function?
What will be the output of the following PHP code? () { define("const","I am awesome!"); echo constant("const"); } one(); ?>
If a const object calls a non-const member function then ____________________
What will the given C code do?
int memcmp(const void *str1, const void *str2, size_t n)
What will be returned in the following C code?
size- t strlen(const char *s)const char *sc;for(sc = s; *sc!= ' \ O ' ; ++sc)return(sc - s) ;