Explore topic-wise MCQs in C Programming.

This section includes 55 Mcqs, each offering curated multiple-choice questions to sharpen your C Programming knowledge and support exam preparation. Choose a topic below to get started.

51.

What will be the output of the program? #include int main() { char far *near *ptr1; char far *far *ptr2; char far *huge *ptr3; printf("%d, %d, %d\n", sizeof(ptr1), sizeof(ptr2), sizeof(ptr3)); return 0; }

A. 4, 4, 8
B. 4, 4, 4
C. 2, 4, 4
D. 2, 4, 8
Answer» D. 2, 4, 8
52.

Declare the following statement? "A pointer to a function which receives an int pointer and returns float pointer".

A. float *(ptr)*int;
B. float *(*ptr)(int)
C. float *(*ptr)(int*)
D. float (*ptr)(int)
Answer» D. float (*ptr)(int)
53.

What do the following declaration signify? int *ptr[30];

A. ptr is a pointer to an array of 30 integer pointers.
B. ptr is a array of 30 pointers to integers.
C. ptr is a array of 30 integer pointers.
D. ptr is a array 30 pointers.
Answer» C. ptr is a array of 30 integer pointers.
54.

Is the following declaration correct?typedef *void (*pfun)(**int, *float);

A. Yes
B. No
C. Yes
D. No
Answer» C. Yes
55.

Declare the following statement? "An array of three pointers to chars".

A. char *ptr[3]();
B. char *ptr[3];
C. char (*ptr[3])();
D. char **ptr[3];
Answer» C. char (*ptr[3])();