C Programming - Complicated Declarations - Discussion

Discussion Forum : Complicated Declarations - General Questions (Q.No. 7)
7.
What do the following declaration signify?
void *cmp();
cmp is a pointer to an void type.
cmp is a void type pointer variable.
cmp is a function that return a void pointer.
cmp function returns nothing.
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
6 comments Page 1 of 1.

Pawankhandwe said:   2 years ago
In this prototype, you can't put * before your function because the syntax is.

<returntype><funcname> (args);.

Sween said:   7 years ago
The void pointer is a generic pointer that has the ability to point to any data type you use it. If you are not sure what data type you are returning but it's not that cmp function return nothing.

Nagesh said:   10 years ago
*cmp() is function. It is not function to pointer.

Pauldaniel said:   1 decade ago
Exactly shalini you are right.

Shalini said:   1 decade ago
Because it is clearly mentioned that it is a prototype function and before cmp star indictes the pointer so, void means it doent return nothing.

Raja said:   1 decade ago
Why it is going to return void pointer?

Post your comments here:

Your comments will be displayed after verification.