C Programming - Pointers - Discussion

Discussion Forum : Pointers - Point Out Correct Statements (Q.No. 1)
1.
Which of the following statements correctly declare a function that receives a pointer to pointer to a pointer to a float and returns a pointer to a pointer to a pointer to a pointer to a float?
float **fun(float***);
float *fun(float**);
float fun(float***);
float ****fun(float***);
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
18 comments Page 2 of 2.

Krishan Kumar Pandey said:   1 decade ago
Can anybody explain This concept again? is it necessary if you passing (int***) to function the function return type should be 'void/int/float ***fun()';

Himanshu Gautam said:   1 decade ago
There are four pointers points to function fun and the argument it receives have three pointers.

Mehul said:   1 decade ago
float ****fun(float***);
Is this possible i mean return value can also be in pointing thing ?

Mehul said:   1 decade ago
float ****fun(float***);
is this possible i mean return value can also be in pointing thing????

Nitinkv49@gmail.com said:   1 decade ago
If you want to receive a pointer then you can us a symbol " * ";

and if you want to return a pointer then you can us a symbol " * ";.

So as per our question that is "receives a "pointer to pointer to a pointer to a float".

We can use "float***"and same for function.

Chandarasekaran said:   1 decade ago
I can't understand. Please explain.

Surya said:   1 decade ago
Thanks sundar.

Sundar said:   1 decade ago
From the given question,

"... receives a pointer to pointer to a pointer to a float... " = ***

"... returns a pointer to a pointer to a pointer to a pointer..." = ****

Therefore, float ****fun (float ***) is the correct answer.
(1)


Post your comments here:

Your comments will be displayed after verification.