answersLogoWhite

0


Best Answer

No. There is no default return type for functions, it must be explicitly specified in both the function declaration and in the definition. To specify no return value, return void. To return a variant type, return void* (pointer to void). Otherwise return the exact type.

User Avatar

Wiki User

10y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

Default return type is int, but omitting return type gives you a warning.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the default return type in C and C plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Fill in blanks in c plus plus?

a functon that doesn't return anything has return type


Why the return type of all the function by default is int in c?

Because int is the most common data-type in C. Don't rely on this though, always specify the return type explicitly.


What use of void data type in c plus plus?

doesn't return the value.


Which is the default parameter passing technique in c plus plus language?

The default is to pass by value.


What is the default access specifier in C plus plus?

private


C plus plus program using function min that take three parameters of type int and returns the minimum of the three?

int min (int a, int b, int c) {if (a


What is the default return type of a function?

The normal exit of program is represented by zero return value. If the code has errors, fault etc., it will be terminated by non-zero value. In C++ language, the main() function can be left without return value. By default, it will return zero. To learn more about data science please visit- Learnbay.co


How do you rectify the waring is function should return a value in turbo c plus plus?

By returning a value. Or using type 'void'.


Can you overload static functions in c plus plus?

Yes, but overloads cannot differ by return type alone. The signatures must differ by the number and/or the type of the arguments.


What are the access control specifiers used in c plus plus?

The access control specifiers in C++ are...public - to denote that the member is accessible from any in scope codeprivate - to denote that the member is accessible only from within the containing classprotected - the same as private, except that derived classes are includedPrivate is the default for a class type object, while public is the default for a structure type object.


What does malloc return in C and C plus plus?

Address of the allocated area, or NULL.


What is the default class type of 195.152.12.1?

Class c