" prototype " ? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 5

" prototype " ?

What is the difference between usual declaration of the function and prototype function ?

21st Mar 2019, 11:15 PM
electron
electron - avatar
1 Réponse
+ 4
int f(); //Non-prototype declaration in C /*Ordinary function declaration in C++ */ int f(void); //Prototype declaration In C++ , this declares a function taking no parameters and returning int. In C ,this declares a function taking unknown parameters and returning int. In other words, a "function prototype" is a function declaration that includes a list of parameter types.
24th Mar 2019, 4:25 PM
electron
electron - avatar