In this tutorial we are learning about function prototypes in C++
Function prototype is a user defined function prototyping is a function make the program easier and easy to read and convinient .
Function prototype is usually written at the beginnning of the program main() , we can ads as parameter to the functions as we can programmer needs.
Making Function Prototype 3 Steps :
- Function Prototype ;
- Function Definitation ;
- Function Call ;
using namespace std;
int add(int x,int y); // Function Declaration
int main() {
int a=10,b=20,c;
c = add(a,b); // Function Call
cout<<"Addition : "<<c;
}
int add(int x,int y) // Function Definition
{
int z;
z = x+y;
return z;
Function prototype as same as function but some changes has been in function prototype function is also a user defind data which is entered by the user as he want . use of function prototype is our code make easier and easy to understand ..
if you have more knowledge about function prototypes so you can share with us :
@ abuzar.abuzar.mohd325@gmail.com
0 Comments
Do not Comment and any spam text