Govt Exams
Variadic functions accept variable number of arguments using ellipsis (...) and accessed with va_list, va_arg macros.
This is call by reference using pointers. The function receives address of x, dereferences and modifies it to 20.
extern allows you to declare a function defined elsewhere, enabling its use across multiple translation units.
Arrays in C decay to pointers to their first element, effectively making them pass-by-reference. Changes inside function affect original array.
This calculates factorial. fact(5) = 5*4*3*2*1 = 120. Base case n<=1 stops recursion.
Default parameters are a C++ feature, not available in standard C. C requires explicit arguments for all parameters.
Declaration (prototype) informs compiler about function signature; definition provides the actual implementation body.
Call by value passes a copy of the variable. Changes inside the function don't affect the original variable. Option B demonstrates this principle.
C requires function declaration before use (forward declaration or definition). Calling without prior declaration causes compilation error in modern C standards.
The void keyword is used as return type for functions that do not return any value.