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.
Pawankhandwe said:
2 years ago
In this prototype, you can't put * before your function because the syntax is.
<returntype><funcname> (args);.
<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:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers