What is Function PROTOTYPE in C++

What is Functon Prototype ?.

Firstly we must know about what is the meaning of “PROTOTYPE ” . the word prototype means “MODEL”. so, when you want to construct a building you must draw a model or map before constructing . this makes your construction easy . the question is how this makes our construction easy? the answer is . if we dont know what we are going to be done , you can not do anything , accidentally if you have done your work then you are not able to understand your progress.

Now, we are going to be talk about prototype in function. “Function prototype” is the function header which consist of return type , function name and parameters the important thing to remember is that it must end with a semi colon ; and it must be before the main function . the syntax of Function Prototype is as follow . string function(string prototype, string dens);

The FUNCTION PROTOTYPE tells compilier the basic information about function this include return data type , function name , and parameters and it ends with a semi colon .

There is slightly differnece between Function Prototype and Function Declaration we will cover this concept in our coming posts.

In conclusion , the Function Prototype is the function header which alerts the complier that something is coming in the main function and compiler get ready for that action or to do that task.

Leave a Comment

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

Scroll to Top
Verified by MonsterInsights