What is the default return type of a function in C if not specified?
What is the difference between function declaration and function definition?
What happens if a function does not have a return statement?
Which of the following function calls is valid?
int calculate(int a, float b, char c);
What is a recursive function?
Advertisement
What is the issue with the following code?
int factorial(int n) { return n * factorial(n-1); }
In C, are function parameters passed by value or by reference by default?
What will be the output?
void modify(int x) { x = x + 10; }
int main() { int a = 5; modify(a); printf("%d", a); }
Which of the following correctly declares a function pointer that points to a function returning int and taking two int parameters?
In C, when a function is called with fewer arguments than declared, what happens?
What will be printed by this code?
void func(int arr[10]) { printf("%lu", sizeof(arr)); }
int main() { int a[10]; func(a); }
What is the correct way to declare a function that accepts variable number of arguments?
Which of the following is true about a static function in C?
What happens if a function declared as returning int doesn't contain a return statement?
Which of the following correctly represents a callback function scenario?
Which of the following about function declaration and definition is TRUE?
What will happen when this code executes?
void func() { func(); } int main() { func(); }
Which of the following is a valid function pointer initialization?
Consider the code: int calculate(int a, int b = 5) { return a + b; }. What is the issue?
What will be the output of this recursive function? int fact(int n) { if(n <= 1) return 1; return n * fact(n-1); } fact(5)