C/C MCQ Quiz Hub

C Questions and Answers – Returning Objects

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

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





✅ Correct Answer: 3

Whenever an object is returned by value ____________________





✅ Correct Answer: 1

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





✅ Correct Answer: 2

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





✅ Correct Answer: 4

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





✅ Correct Answer: 1

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





✅ Correct Answer: 2

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





✅ Correct Answer: 1

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





✅ Correct Answer: 3

If object is passed by reference ____________________





✅ Correct Answer: 4

Which among the following is correct?





✅ Correct Answer: 2

Can we return an array of objects?





✅ Correct Answer: 1

Which among the following is true?





✅ Correct Answer: 1

If an object is being returned by value then __________________________





✅ Correct Answer: 4

Why temporary object is not created in return by reference?





✅ Correct Answer: 3