ExamVeda
Login
Home
This question belongs to C Program C Fundamentals
C Fundamentals
?

What is the default return type of a function in C if not specified?

Answer & Solution
Correct Answer: Option A
The default return type of a function in C if not specified is Option A: int. In C, if you don't explicitly specify the return type of a function, it is assumed to return an integer (int) by default.

So, the correct answer is:
Option A: int

For example, if you have a function like this:

myFunction() {
// Function code
}

The return type is assumed to be int, and you can call it as if it returns an integer. If you want a function to return nothing, you explicitly specify Option B: void as the return type.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.