Write in C code a. For the following section of code, determine the data create a three-coal declared variables. To do this use a separate sheet of paper, and create a three-column table with the headings: Variable name, Data type, and Scope. A sample table, with the information on the first variable filled in for you, follows: Variable name data type scope key character global to main (), func1 (), and func2 () char key; long int number; int main () { int a,b,c; float x, Y; return 0; } float secnum; int func1 (int num1, int num2) { int o,p; float g; return (p) ; } float func2 (float first, float last) { int a, b, c,o, p; float r; float s,t,x; return (s*t); } b. Draw a box around the appropriate section of the above code to enclose the scope the variables key, secum, y, and r. c. Determine the data type of the parameters for the functions func1() and func2() and the data type of the value returned by these functions.
Write in C code
a. For the following section of code, determine the data create a three-coal declared variables. To do this use a separate sheet of paper, and create a three-column table with the headings: Variable name, Data type, and Scope. A sample table, with the information on the first variable filled in for you, follows:
Variable name | data type | scope |
key | character | global to main (), func1 (), and func2 () |
char key;
long int number;
int main ()
{
int a,b,c;
float x, Y;
return 0;
}
float secnum;
int func1 (int num1, int num2)
{
int o,p;
float g;
return (p) ;
}
float func2 (float first, float last)
{
int a, b, c,o, p;
float r;
float s,t,x;
return (s*t);
}
b. Draw a box around the appropriate section of the above code to enclose the scope the variables key, secum, y, and r.
c. Determine the data type of the parameters for the functions func1() and func2() and the data type of the value returned by these functions.
thanks!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps