Q:

If a function is to be made const, which is the correct syntax?

0

If a function is to be made const, which is the correct syntax?


  1. const functionName(parameters);
  2. const returnType functionName(parameters);
  3. const functionName(returnType)(Parameters);
  4. const (functionName(parameters));

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

(b).const returnType functionName(parameters);

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

OBJECT ORIENTED PROGRAMMING MEMBER FUNCTIONS MCQ

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Functions which differ in const-ness are considere... >>
<< When both the const and non-const version of a fun...