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:
5
the value is 20

Comments

Popular posts from this blog

PROGRAM TO PERFORM CALL BY REFERENCE

PROGRAM TO PERFORM RRETURN BY REFERENCE