+ 1
question
Fill in the blanks to declare a swap function that takes two integer pointers and swaps the values pointed by them. void swap( a, int* b) { int temp = *a; *a = *b; b = temp; }
4 Respostas
+ 3
void swap(int *a, int *b)
{
int* temp = *a;
*a = *b;
*b = temp;
}
int main()
{
int a = 3;
int b = 4;
swap(&a,&b);
printf("%d %d",a,b);
return 0;
}
+ 2
*
+ 2
Fill in the blanks to declare a swap function that takes two integer pointers and swaps the values pointed by them.
void swap(int*a, int* b) {
int temp = *a;
*a = *b;
*b = temp;
}
0
Fill in the blanks to declare a swap function that takes two integer pointers and swaps the values pointed by them.
void swap(
--
a, int* b) {
int temp = *a;
*a = *b;
-
b = temp;
}
Answ int* and *