4.A function 'q' that accepts a pointer to a character as
argument and returns a pointer to an array of integer can
be declared as:
A)int (*q(char*)) []
B)int *q(char*) []
C)int(*q)(char*) []
D)None of the Above

Answer Posted / sambuddha

THE ANSWER WILL BE
D)NONE OF THE ABOVE

THE CORRECT WAY TO DECLARE IT WILL BE

int * q(char * );

ret_type func_name(arg); is a general function declaration.

ret_type is pointer to an array of integer i.e, int *

arg is accepts a pointer to a character i.e, char *

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differentiate call by value and call by reference?

562


Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix

1509


int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer

647


How many header files are in c?

547


What is d scanf?

584






Explain Function Pointer?

681


What is the difference between exit() and _exit() function?

598


What is ponter?

768


What do you mean by command line argument?

636


What are pointers? Why are they used?

627


What do you mean by dynamic memory allocation in c?

644


What is exit() function?

559


What is a header file?

631


How can I do peek and poke in c?

613


When can you use a pointer with a function?

562