Examveda
Examveda

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

A. int

B. void

C. char

D. float

Answer: Option A

Solution(By Examveda Team)

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.

This Question Belongs to C Program >> C Fundamentals

Join The Discussion

Related Questions on C Fundamentals