What happens when a function is called without a return statement reaching the end?
Q.62Medium
In C, how many parameters can a function have at maximum?
Q.63Medium
What is the scope of a static variable declared inside a function?
Q.64Medium
Which calling convention passes parameters through the stack from right to left?
Q.65Easy
What will be the output of the following code?
int add(int a, int b) { return a + b; }
int main() { printf("%d", add(5, add(3, 2))); return 0; }
Advertisement
Q.66Medium
What is the difference between call by value and call by reference in C?
Q.67Medium
Analyze the following pointer to function declaration: int (*ptr)(int, int);
Q.68Easy
What is the output of this recursive function?
int fact(int n) { if(n<=1) return 1; return n*fact(n-1); }
main() { printf("%d", fact(4)); }
Q.69Medium
Which of the following is true about function pointers in C?
Q.70Medium
What is the primary advantage of using inline functions?
Q.71Medium
Consider the function: void func(int *arr, int size). Which statement is correct?
Q.72Hard
What does the restrict keyword do when used with pointer parameters in C99?
Q.73Medium
Which approach correctly implements a function returning multiple values?
Q.74Hard
What will this code output?
int x = 10;
int* getAddress() { return &x; }
main() { int *ptr = getAddress(); printf("%d", *ptr); }
Q.75Easy
In C, what is the purpose of the return statement in a void function?
Q.76Hard
What happens when a function with variadic parameters is called with fewer arguments than expected?
Q.77Medium
Which of the following correctly declares a variadic function?
Q.78Medium
What will be the output of this code?
int counter = 0;
void increment() { static int count = 0; count++; counter++; }
main() { increment(); increment(); printf("%d %d", count, counter); }
Q.79Easy
Which of the following is a correct function prototype in C?