Govt Exams
A callback function is a function pointer passed to another function, which calls it at a later point in time.
Pre-increment (++x) increments and returns the new value, while post-increment (x++) increments but returns the old value.
Without an explicit return statement, the function returns whatever value is in the return register, which is undefined behavior.
A static function has file scope and cannot be accessed from other translation units, providing encapsulation.
Variadic functions require at least one named parameter before the ellipsis. Both options B and C follow the correct syntax.
void func(int arr[10]) { printf("%lu", sizeof(arr)); }
int main() { int a[10]; func(a); }
When arrays are passed to functions, they decay to pointers. sizeof(arr) returns the size of the pointer, not the array.
The 'inline' keyword (introduced in C99) suggests to the compiler to replace function calls with actual code, reducing call overhead.
Function parameters have function scope, meaning they are accessible throughout the entire function body.
Old-style K&R C declarations don't perform argument checking, allowing calls with fewer arguments. Modern prototyped functions generate compiler errors.
The correct syntax for function pointer is return_type (*pointer_name)(parameter_types). Option A is correct.