C Programming - Complicated Declarations - Discussion
Discussion Forum : Complicated Declarations - General Questions (Q.No. 7)
7.
What do the following declaration signify?
void *cmp();
Discussion:
6 comments Page 1 of 1.
Raja said:
1 decade ago
Why it is going to return void pointer?
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.
Pauldaniel said:
1 decade ago
Exactly shalini you are right.
Nagesh said:
1 decade ago
*cmp() is function. It is not function to pointer.
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.
Pawankhandwe said:
4 years ago
In this prototype, you can't put * before your function because the syntax is.
<returntype><funcname> (args);.
<returntype><funcname> (args);.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers