Question: #include void f ( int num 1 , int num 2 , int * ptr 3 ) { int temp = * ( ptr 3

#include
void f(int num1, int num2, int *ptr3){
int temp =*(ptr3+ num1);
ptr3[num1]= ptr3[num2];
*(ptr3+ num2)= temp;
}
int main(void){
int a =3;
int b =0;
int c[]={13,3,21,8,2,5};
f(a, b, c+1);
printf("%i,%i,%i,%i,%i,%i
", c[0], c[1], c[2], c[3], c[4], c[5]);
return 0;
}
Which one of the following shows the output of the program?

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 Programming Questions!