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

What are the main characteristics of c language describe the structure of ac program?

948


what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555

2806


What is operator promotion?

833


What is the deal on sprintf_s return value?

856


Write a c program to build a heap method using Pointer to function and pointer to structure ?

4420


How can I read in an object file and jump to locations in it?

810


Create a simple code fragment that will swap the values of two variables num1 and num2.

1061


Do you know the difference between malloc() and calloc() function?

831


What is the difference between text and binary i/o?

797


Does c have function or method?

805


Draw a flowchart to produce a printed list of all the students over the age of 20 in a class .The input records contains the name and age of students. Assume a sentinel value of 99 for the age field of the trailer record

4996


typedef struct{ char *; nodeptr next; } * nodeptr ; What does nodeptr stand for?

1408


What is array of pointers to string?

809


What does c mean?

784


Is void a keyword in c?

769