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.

Sween said:   9 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.

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.

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

<returntype><funcname> (args);.

Nagesh said:   1 decade ago
*cmp() is function. It is not function to pointer.

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

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

Post your comments here:

Your comments will be displayed after verification.