Variadic Functions
Learn about the variadic functions.
We'll cover the following
What are variadic functions?
A variadic function is one which accepts a variable number of input arguments. We can write functions that are variadic in C. Sometimes this may be useful. For example, the printf
function which, as we’ve already seen, can accept a variable number of input arguments.
Here’s an example of a variadic function mean
that computes the average of a variable-sized list of numbers:
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy