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.41Medium

In the expression: int arr[5]; int *p = arr; What does p + 2 represent?

Q.42Medium

What is the purpose of the const keyword in: int * const p;?

Q.43Medium

Which scenario demonstrates a dangling pointer?

Q.44Medium

For function: void modify(int *x) { *x = 20; } If called as modify(&a), what changes?

Q.45Medium

Which of the following is valid pointer comparison?

Q.46Medium

In: int *p; *p = 10; What is the issue?

Q.47Medium

For dynamic 2D array allocation using int arr = (int)malloc(n*sizeof(int*)); what must be done next?

Q.48Medium

Which of the following is a valid pointer comparison in C?

Q.49Medium

What will be the output? int arr[5] = {1,2,3,4,5}; int *p = arr; p += 2; printf("%d", *p);

Q.50Medium

In pointer to function declaration: int (*ptr)(int, int); which statement is correct?

Q.51Medium

Consider a function void modify(int *x) { *x = 20; } called as modify(&y). What happens?