1.

A function can have both the const and non-const version in the same program.(a) True(b) FalseI got this question in an interview.I want to ask this question from Constant Member Functions topic in portion Member Functions & its Types of Object Oriented Programming

Answer»

Correct option is (a) True

Explanation: The functions in a program can be made both const and non-const. This FEATURE is made available to make programming more flexible. This ENSURES the security too as we can CALL const FUNCTION whenever required.



Discussion

No Comment Found

Related InterviewSolutions