+ 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; }

16th Jun 2020, 8:25 AM
Raje Anant Tejale
Raje Anant Tejale - avatar
4 RĂ©ponses
+ 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; }
16th Jun 2020, 8:50 AM
$±𝐎â‚č𝔭!𝐹𝓝
$±𝐎â‚č𝔭!𝐹𝓝 - avatar
+ 2
*
27th Dec 2021, 6:25 AM
Ahsan Habib
Ahsan Habib - avatar
+ 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; }
24th Sep 2022, 3:08 PM
ABDUL WAHAB
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 *
24th Feb 2023, 12:19 PM
Jembere Guta
Jembere Guta - avatar