C Language Problem Please Explain Whats wrong with the follo

C Language Problem

Please Explain

What\'s wrong with the following function call: (3 dots means I\'m not showing all of the progrom steps) #include double find_scale(double x, int n); int main(void) {double num_1, num_3; int num_2; num_3 = Find_scale(num_1, num_2); return(0);} double find_scale(double X, int n) {return(0);}

Solution

we declared the function with name find_scale() .But we called the method with different name(Find_scale() .F is capital letter here.Which is wrong .Should exactly same as method delaration)

We have to take care in these type of mistakes otherwise which leads to compilation errors.

______________________

The other error is, in the function implementation of find_scale(double x,int n) we have to return the double value at the end of the method.

the correct format is:

#include<stdio.h>
double find_scale(double x,int n);
-
-
-
-
-

int main(void)
{
double num_1,num_3;
int num_2;
-
-
-
-
num_3=find_scale(num_1,num_2);
-
-
-
-
return(0);
}

double find_scale(double x,int n)
{
-
-
-
-
return val;//(here val is of type double)
}

C Language Problem Please Explain What\'s wrong with the following function call: (3 dots means I\'m not showing all of the progrom steps) #include double find_

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site