Question: [4 marks) Question 1 Given the C program in Figure 1, find the output of the program main.c 1 #include 2 3 void convert(int); 4

 [4 marks) Question 1 Given the C program in Figure 1,

[4 marks) Question 1 Given the C program in Figure 1, find the output of the program main.c 1 #include 2 3 void convert(int); 4 int convert2(int); 5 6 int main(void) { 7 int a=5; 8 int b; 9 10 printf("Before convert: a=%d ", a); 11 convert(a); 12 printf("After convert: a=%d ", a); 13 b=convert2(a); 14 printf("After convert2: a=%d b=%d ", a,b); 15 return 0; 16 } 17 18 void convert(int a) { 19 a=2*a; 20 } 21 22 23 24 25 26 27 int convert2(int b) { int a; a=4; b=a*b; return (b); } Figure 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!