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

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

Question 1 [4 marks] 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 int convert2(int b){ 23 24 a=4; 25 b=a*b; 26 return (b); 27 } int a; 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!