- #1
Nothing000
- 403
- 0
Will someone please help me. I can not fiugure out how to get a local variables value to go from one function to another. Here is the source code:
#include <stdio.h>
int f1(int b);
int main()
{
int a = 0;
int b = 0;
f1();
printf("The value returned TO main() FROM f1() is:\n", a);
return 0;
}
int f1()
{
int a = 0;
printf("Enter a whole number.\n");
scanf("%d", a);
return a;
}
#include <stdio.h>
int f1(int b);
int main()
{
int a = 0;
int b = 0;
f1();
printf("The value returned TO main() FROM f1() is:\n", a);
return 0;
}
int f1()
{
int a = 0;
printf("Enter a whole number.\n");
scanf("%d", a);
return a;
}