C-Complicated Declarations MCQ
C-Complicated Declarations MCQ
1. Declare the following statement?
"An array of three pointers to chars".
"An array of three pointers to chars".
- char *ptr[3]();
- char *ptr[3];
- char (*ptr[3])();
- char **ptr[3];
2. What do the following declaration signify?
int *ptr[30];
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.
3. Declare the following statement?
"A pointer to an array of three chars".
"A pointer to an array of three chars".
- char *ptr[3]();
- char (*ptr)*[3];
- char (*ptr[3])();
- char (*ptr)[3];
4. What do the following declaration signify?
char *arr[10];
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.
5. What do the following declaration signify?
int (*pf)();
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.
6. Declare the following statement?
"A pointer to a function which receives an int pointer and returns float pointer".
;
"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)
7. What do the following declaration signify?
void *cmp();
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.
8. Declare the following statement?
"A pointer to a function which receives nothing and returns nothing".
"A pointer to a function which receives nothing and returns nothing".
- void *(ptr)*int;
- void *(*ptr)()
- void *(*ptr)(*)
- void (*ptr)()
9. What do the following declaration signify?
int *f();
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.
10. What do the following declaration signify?
void (*cmp)();
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 .