PROGRAM TO PERFORM INLINE FUNCTION
Program to perform inline function:Code:
#include<iostream.h>
#include<conio.h>
inline float convert_feet(int x)
{
return x*4;
}
void main()
{
clrscr();
int inches;
cin>>inches;
cout<<"the value
is"<<"\t"<<convert_feet(inches);
getch();
}
Output:
5the value is 20
Comments
Post a Comment