Question 1Easy
Which of these features is NOT supported in standard C?
- Functions with a variable number of arguments
- Recursive functions
- Pointers to functions
- Function overloading (two functions with the same name but different parameters)
Answer: D. Function overloading (two functions with the same name but different parameters)
Explanation
C requires each function name with external linkage to be unique, so overloading is not allowed (C++ adds it). Recursion, function pointers and variadic functions are all standard C.
Step-by-step solution
- Function overloading is when two functions have same name but different parameters.
- In C, each function name must be unique, so this is not allowed.
- Recursive functions are allowed in C.
- Pointers to functions are supported in C.
- Functions with variable arguments like
printf()are standard in C. - Therefore, function overloading is NOT supported in standard C.
Why the other options are wrong
- A. Variadic functions are standard in C through stdarg.h and printf, so this feature is supported.
- B. Recursive functions are allowed in C; each call simply gets its own stack frame.
- C. Pointers to functions are standard in C, used for callbacks and tables of operations.
Tip: Remember: C has no function overloading.