1.

Which of the following is the default return value of functions in C++?(a) int(b) char(c) float(d) voidI had been asked this question in my homework.Question is from Functions topic in section Functions, Namespaces & Exceptions in C++ of C++

Answer»

The CORRECT answer is (a) INT

Explanation: C++ uses int as the default return values for functions. It also RESTRICTS that the return type of the main function must be int.



Discussion

No Comment Found

Related InterviewSolutions