Interview Questions and Answers :: Ericsson
Home > Experience Archives > Ericsson > Interview Question Set 2 > Discussion
6. Tell me what are the following declarations
void (*func) (int)
int *(*func)[10] (int)
int *(*func[10]) (int *)
Answer:
void (*func) (int) => "func" is a pointer to function with argument as int and return void
int *(*func)[10] (int) => func is a pointer to function with argument as int and returning as array of pointer.
int *(*func[10]) (int *) => "func" is a array 10 of function pointer with argument as int pointer and return pointer to int.
Amit
17 Aug, 2016 10:11 PM
void (*func) (int) => "func" is a pointer to function with argument as int and return void
int *(*func)[10] (int) => func is a pointer to function with argument as int and returning as array of pointer.
int *(*func[10]) (int *) => "func" is a array 10 of function pointer with argument as int pointer and return pointer to int.
int *(*func)[10] (int) => func is a pointer to function with argument as int and returning as array of pointer.
int *(*func[10]) (int *) => "func" is a array 10 of function pointer with argument as int pointer and return pointer to int.
Report Error
Report Error
Please Login First Click Here