What is Function PROTOTYPE in c++.

Firstly we discuss , what is the meaning “prototype” . the word prototype means “model”. model is a something which we use to follow to make something . without model it is very difficult to make , manufactured something . For example if we want to construct a building we a model,structure on the page to construct it , this helps us in constructing that building.

Now you understand the meaning of prototype . So , we can we say that in c++ PROTOTYPE is a model that helps compiler to know about the function that will be call somewhere in the main function . now compiler knows that something will be used in the main function .

We use PROTOTYPE in c++ to make our program more readable and we can find errors easily . the PROTOTYPE must be used before the main function and it must end with a semi colon ; .

Function PROTOTYPE informs the compiler about data type,function name and formal parameters. and its end with semi colon ; the syntax of Function PROTOTYPE is . int timber(int dens, int code);

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top
Verified by MonsterInsights