Answer to Question #191878 in C++ for Utkarsh

Question #191878

Construct a C++ program to find the square of a number using default arguments and inline functions


1
Expert's answer
2021-05-11T07:47:10-0400
#include <iostream>
using namespace std;
inline float square(float x = 0){
    return x * x;
}
int main(){
    cout<<square()<<endl;
    cout<<square(3);
    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment