iGET

C Programming - MCQ Practice Questions

Practice free C Programming multiple-choice questions with detailed answers and explanations. Perfect for competitive exam preparation.

978 questions | 100% Free

Q.61Hard

Analyze: int (*funcPtr)(int, int); What does this declaration represent?

Q.62Hard

In C99 standard, what is true about function declarations at block scope?

Q.63Hard

Which approach is more efficient for passing large structures to functions?

Q.64Hard

What does the restrict keyword do when used with pointer parameters in C99?

Q.65Hard

What will this code output? int x = 10; int* getAddress() { return &x; } main() { int *ptr = getAddress(); printf("%d", *ptr); }

Q.66Hard

What happens when a function with variadic parameters is called with fewer arguments than expected?

Q.67Hard

How are function arguments evaluated in C?

Q.68Hard

In the context of function pointers, what does the restrict keyword do?

Q.69Hard

Which of the following about variadic functions is true?

Q.70Hard

What is a callback function in C?

Q.71Hard

In C, what is the relationship between array parameters and pointers in functions?

Q.72Hard

In a recursive function implementing factorial calculation, the base case is missing. What is the most likely consequence during execution?

Q.73Hard

Consider a 2D array int matrix[3][3]. If we access matrix as a 1D array, how many total elements can we access?

Q.74Hard

What will be output of the following code? char str[] = "GATE2025"; for(int i=0; str[i]!='\0'; i++) if(i%2==0) printf("%c", str[i]);

Q.75Hard

Consider: int arr[3][4][5]. What is the size of arr[0][0]?

Q.76Hard

Which of the following is true about strcpy(dest, src)?

Q.77Hard

What is the main difference between char arr[] = "Test" and char *ptr = "Test"?

Q.78Hard

If ptr is a pointer to int array and ptr = arr, what does ptr[3] represent?

Q.79Hard

What is the correct way to safely copy strings in modern C?

Q.80Hard

In the declaration int *arr[10], what is arr?