C/C MCQ Quiz Hub

C Questions and Answers – Returning Objects

Choose a topic to test your knowledge and improve your C/C skills

1. In which of the following way(s) can the object be returned from a function?




2. Whenever an object is returned by value ____________________




3. Where the temporary objects (created while return by value) are created?




4. Which is the correct syntax for returning an object by value?




5. Which is the correct syntax for defining a function which passes an object by reference?




6. If an object is declared inside the function then ____________________ outside the function.




7. How many independent objects can be returned at same time from a function?




8. Which error will be produced if a local object is returned by reference outside a function?




9. If object is passed by reference ____________________




10. Which among the following is correct?




11. Can we return an array of objects?




12. Which among the following is true?




13. If an object is being returned by value then __________________________




14. Why temporary object is not created in return by reference?