#include <stdio.h>
void changevalue(int v[],int s,int a) {
int temp,i;
temp = v[s];
v[s] = v[a];
v[a] = temp;
for (i = 0; i <= 3; i++) {
printf("%d\n", v[i]);
}
}
int main() {
int v[] = { 10,5,20,4 },i;
changevalue(v,1,2);
return 0;
}
#include <stdio.h>
void changevalue(int v[],int s,int a) {
int temp,i;
temp = v[s];
v[s] = v[a];
v[a] = temp;
for (i = 0; i <= 3; i++) {
printf("%d\n", v[i]);
}
}
int main() {
int v[] = { 10,5,20,4 },i;
changevalue(v,1,2);
return 0;
}