C and DS Gate MCQ Question and Answer

C and DS Gate MCQ Question and Answer
1. Declare the following statement? "An array of seven pointers to chars".
  • char *ptr[7]();
  • char *ptr[7];
  • char (*ptr[7])();
  • char **ptr[7];
Show Answer
2. Declare the following statement? "A pointer to an array of seven chars".
  • char *ptr[7]();
  • char (*ptr)*[7];
  • char (*ptr[7])();
  • char (*ptr)[7];
Show Answer
3. What do the following declaration signify? char *arr[7];
  • arr is a array of 7 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
4. What do the following declaration signify? void *foo();
  • foo is a pointer to an void type.
  • foo is a void type pointer variable.
  • foo is a function that return a void pointer
  • foo function returns nothing
Show Answer
5. What do the following declaration signify? int *ptr[7];
  • ptr is a pointer to an array of 7 integer pointers.
  • ptr is a array of 7 pointers to integers.
  • ptr is a array of 7 integer pointers.
  • ptr is a array 7 pointers.
Show Answer
6. What do the following declaration signify? int (*foo)();
  • foo is a pointer to function.
  • foo is a function pointer.
  • foo is a pointer to a function which return int
  • foo is a function of pointer variable.
Show Answer
7. 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
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 *foo();
  • foo is a pointer variable of function type.
  • foo is a function returning pointer to an int.
  • foo is a function pointer.
  • foo is a simple declaration of pointer variable.
Show Answer
10. What do the following declaration signify? void (*foo)();
  • . foo is a pointer to an void function type.
  • foo is a void type pointer function.
  • foo is a function that return a void pointer.
  • foo is a pointer to a function which returns void .
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test