Consider the following functions
string propercase(string z); void swapit(int a, double b); double cylinder_height(int h, double r);
and these variables:
string greeting = “Hello!” int f; double g; double x;
What is wrong with each of the following function calls?
1. greeting = propercase(f);
2. double swap_it(f, g)
3. greeting = cylinder_height(f,g)
Solution
1. greeting = propercase(f);argument should be of type string.But f is of type int.2. double swap_it(f, g)swap_it return type is void.So, it should be just like “swap_it(f, g)”3. greeting = cylinder_height(f,g)cylinder_height method return type is double.But greeting is
OR
OR