Jackie Dalen
Jackie Dalen

Reputation: 49

C Function Overloading

Isn't the answer is "A" because function overloading isn't allowed in C?

More than one function in the same file may have the same name:

A. never in C and only if their signatures are unambiguously different in C++.

B. only if they are all declared static.

C. if all but 1 are declared static or const.

D. only if no external variables are used.

Upvotes: 0

Views: 397

Answers (1)

masoud
masoud

Reputation: 56509

C doesn't support overloading.

In C++, keywords static and const* can not effect on overloading.

Then A is the answer.


* Not const for constant member functions inside a class declaration to make this pointer a const.

Upvotes: 2

Related Questions