Log In
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
1 vote
What does the following function declare

 int *(*p)(char (*a) []);

A)p is a pointer to a function that takes an argument as pointer and returns an integer.

B) p is a pointer to a function takes an argument as pointer to a character and returns a pointer integer.

C)  p is a pointer to a function  that takes an argument as array of pointers to characters and returns a pointer to an integer.

D) None of these.
in Programming 15 points 23 views

B is right and it should be character array

@ palash  Yadav

Ans - option (B)

What are predence of  [] and () .?
0 i think both have same precedence.i might have made a mistake,the argument one is pointer to array

DKY123 ,i think option (B) should be character array not character,then it is right
@Palash Yadav

Why Option (C) is Wrong?

Why not consider [] .
@Palash Yadav

Thank you for clear my  doubt .

Your approach is right .

I choosed Option (C) but my answer is wrong.

Given correct answer is Option (B).

1 Answer

1 vote
Best answer,Syntax%3A&text=We%20can%20make%20separate%20pointer,point%20to%20all%20the%20values. if you are finding difficulty in solving that i have edited my answer on why b is right or you can look at the article,,,,option c is wrong because it mention array of pointers as argument which is wrong it is pointer to a character array

135 points
selected by