Consider Following Functions String Propercase String Z Void Swapit Int Double B Double Cy Q37126664

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

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.