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

if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0

1448


Why structure is used in c?

590


write a program to copy the string using switch case?

2401


How are pointers declared in c?

596


What does 3 periods mean in texting?

600






How do we open a binary file in Read/Write mode in C?

680


Can you please compare array with pointer?

615


Why void main is used in c?

559


What is a macro, and explain how do you use it?

627


Why do we use header files in c?

580


What are the types of pointers?

599


What is the purpose of 'register' keyword?

691


A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM

1699


struct screen_pos{ int row, col } ;move_right(cursor)struct screen_pos *cursor;{ cursor.col++; } /* This statementhas a syntax error */What is the correct statement a) cursor.col = cursor.col + 1; b) col.cursor++; c) *cursor.col++; d) pointer

766


Simplify the program segment if X = B then C ← true else C ← false

2583