Which is the correct syntax for returning an object by value?
(a) void functionName ( ){ }
(b) object functionName( ) { }
(c) class object functionName( ) { }
(d) ClassName functionName ( ){ }
The question was posed to me during an interview for a job.
My doubt stems from Returning Objects in chapter Assigning Object, Pointer to Objects, Passing and Returning Object of Object Oriented Programming