(Find the Error) Find the error in each of the following program segments and explain how to correct it:
a) float cube( float ); // function prototypecube( float number ) // function definition{return number * number * number;}b)
int randomNumber = srand();c)
float y = 123.45678;int x;x = y;cout << static_cast( x ) << endl; d)
double square( double number ){double number = 0; return number * number;}e)
int sum( int n ){if ( == n )return 0; elsereturn n+sum(n);}
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.