Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

What is the correct function call for row 11 - select A, B, C or D? 01:/* Sort t

ID: 3841798 • Letter: W

Question

What is the correct function call for row 11 - select A, B, C or D? 01:/* Sort two numbers */02: #include 03: void MinMax(int *Value1, int *Value2); 04: 05: int main(void) 06: {07: int a, b; 08: 09: printf("Enter two numbers and I will sort them for you:"); 10: scanf("%d%d", &a;, &b;); 11: 12: printf("%d, %d ", a, b); 13: 14: return 0; 15:} 16: 17: void MinMax(int *Value1, int *Value2) 18: {19: int tmp; 20: 21:/* If value 1 largest then swap values */22: if(*Value1>*Value2) 23: {24: tmp=*Value1; 25: *Value1=*Value2; 26: *Value2=tmp; 27:} 28:} MinMax(&a;, &b;); MinMax(*a, *b); MinMax(a, b); MinMax(a[], b[]);

Explanation / Answer

Answer:

Correct Answer is Option A i.e MinMax(&a,&b);

Explanation:

The line number 11 must be filled with MinMax(&a,&b); to execute the code since the function MinMax i.e void MinMax(int *Value1, int *Value2) consists pointer values as *Value1 and *Value2 respectively which expects the parameters which are passed must be refernce or address values to assign values for Value1 and Value2 pointers which in our case are &a and &b from the given options are used for swapping the two variables using the pointers.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote