Write a function that swaps the values of two integers, using int* as the argument type.

void swap(int* a, int*b) {
intt;
t=*a;
*a = *b;
*b = t;
}

0 comments:

Post a Comment

Blogger news