0

void swap (int *num1, int *num2); van someone explain about this"swap"?

22nd Apr 2020, 2:43 AM
narthana wickramasinghe
narthana wickramasinghe - avatar
2 Respuestas
+ 4
Swap is a function which change value if assigned properly, Like void swap(int * n1 , int * n2) { int * temp; * temp= *n1; *n1=*n2; *n2=*temp; // values of n2 and n1 are //permanently changed . }
22nd Apr 2020, 2:55 AM
Raj Kalash Tiwari
Raj Kalash Tiwari - avatar