MCQOPTIONS
Saved Bookmarks
This section includes 5 Mcqs, each offering curated multiple-choice questions to sharpen your Arrays knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Declare the following statement? "A pointer to a function which receives nothing and returns nothing". |
| A. | void *(ptr)* int ; |
| B. | void *(*ptr)() |
| C. | void *(*ptr)(*) |
| D. | void (*ptr)() |
| Answer» E. | |
| 2. |
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 ) | |
| 3. |
Declare the following statement? "A pointer to an array of three chars". |
| A. | char *ptr[ 3 ](); |
| B. | char (*ptr)*[ 3 ]; |
| C. | char (*ptr[ 3 ])(); |
| D. | char (*ptr)[ 3 ]; |
| Answer» E. | |
| 4. |
What do the following declaration signify? |
| 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. | |
| 5. |
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 ])(); | |