Trusted by millions of Kenyans
Study resources on Kenyaplex

Get ready-made curriculum aligned revision materials

Exam papers, notes, holiday assignments and topical questions – all aligned to the Kenyan curriculum.

What is an inline function? Write a c++ program to find the maximum of two numbers using inline function?

What is an inline function? Write a c++ program to find the maximum of two numbers using inline function?

Answers


Francis
is a function that is expanded in a line when invoked.
#include
using namespace std;
inline float max(float a,float b)
{
return(a>b);
}
int main()
{
float a = 12;
float b = 20;
cout<<(a,b)
cout<<(a,b)<<"\n";
return 0;
}
Francis Nkurumwa answered the question on March 1, 2018 at 15:20

Answer Attachments

Exams With Marking Schemes

Related Questions