• edited by
1,187 views

1 Answer

Best answer
1 1 vote

Here let us understand the meaning of each options .

Option A) is meaningless as far as I know since it is variable name first before type which is totally wrong.

Option B) says a function q which takes a pointer to character as parameter and then the return type is an array of integers..Since parantheses and array subscript operator have same precedence so associativity criterion is used..Since both of them are left to right associative , so compiler first interprets that there is a function whose set of parameter comprises of pointer to char data type and then on seeing the subscript operator it understands that the return type is pointer to an array of integers since there is a '*' before q.

Option C) says a pointer to a function q which takes pointer to char as argument and the return type is an array of integers.So C) is also not true.

Hence the correct option should be B).

• selected by
Position:
Show:

Related questions

0 0 votes
0 0 answers
1.1k
1.1k views
Gurdeep Saini asked Jan 11, 2019
1,069 views
Let p be character pointer, consider the following statementp[i]=*(p+i)i[p]=*(i+p)p+i=&(i[p])how many are true ??
7 7 votes
3 3 answers
500
500 views
GO Classes asked Jul 1
500 views
What does the following code do?#include <stdio.h int main() { char c; while ((c = getchar()) != EOF) { if (c >= 'A' && c <= 'Z') c = c - 'A' + 'a'; putchar(c); } return ...
6 6 votes
2 2 answers
357
357 views
GO Classes asked Jun 24
357 views
What is the output of the following code?#include <stdio.h int main() { char str[] = {'C', 'S', 'E', '\0', 'X'}; printf("%s %c", str, str[4]); return 0; }$\texttt{CSE X}$...
0 0 votes
1 1 answer
2.0k
2.0k views
Manu FG asked May 21, 2017
1,976 views
/*strcpy"copy t to s; */void strcpy(char *s, char *t){while((*s++=*t++) !='\0');} Can anyone explain how *s++ or *t++ is being executed. As * and ++ are unary operators h...