C-Complicated Declarations MCQ

C-Complicated Declarations MCQ
1. Declare the following statement?
"An array of three pointers to chars".
  • char *ptr[3]();
  • char *ptr[3];
  • char (*ptr[3])();
  • char **ptr[3];
Show Answer
2. What do the following declaration signify?

int *ptr[30];
  • ptr is a pointer to an array of 30 integer pointers.
  • ptr is a array of 30 pointers to integers.
  • ptr is a array of 30 integer pointers.
  • ptr is a array 30 pointers.
Show Answer
3. Declare the following statement?
"A pointer to an array of three chars".
  • char *ptr[3]();
  • char (*ptr)*[3];
  • char (*ptr[3])();
  • char (*ptr)[3];
Show Answer
4. What do the following declaration signify?
char *arr[10];
  • arr is a array of 10 character pointers.
  • arr is a array of function pointer.
  • arr is a array of characters.
  • arr is a pointer to array of characters.
Show Answer
5.  What do the following declaration signify?
int (*pf)();
  • pf is a pointer to function.
  • pf is a function pointer.
  • pf is a pointer to a function which return int
  • pf is a function of pointer variable.
Show Answer
6. Declare the following statement?
"A pointer to a function which receives an int pointer and returns float pointer".
;
  • float *(ptr)*int
  • float *(*ptr)(int)
  • float *(*ptr)(int*)
  • float (*ptr)(int)
Show Answer
7. What do the following declaration signify?
void *cmp();
  • cmp is a pointer to an void type.
  • cmp is a void type pointer variable.
  • cmp is a function that return a void pointer.
  • cmp function returns nothing.
Show Answer
8. Declare the following statement?
"A pointer to a function which receives nothing and returns nothing".
  • void *(ptr)*int;
  • void *(*ptr)()
  • void *(*ptr)(*)
  • void (*ptr)()
Show Answer
9. What do the following declaration signify?

int *f();
  • f is a pointer variable of function type.
  • f is a function returning pointer to an int.
  • f is a function pointer.
  • f is a simple declaration of pointer variable.
Show Answer
10. What do the following declaration signify?

void (*cmp)();
  • cmp is a pointer to an void function type.
  • cmp is a void type pointer function.
  • cmp is a function that return a void pointer.
  • cmp is a pointer to a function which returns void .
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test