I seek explanation of following question

#include<stdio.h> void function1(int**,int**); int main() { int a=5,b=7; int *p,*q; p=&a,q=&b; function1(&p,&q); printf("%d %d %d %d",*p,*q,a,b); return 0; } void function1(int **p,int **q) { int **t; *t=*p; **p=**q+**p; *p=*q; **q=**p-**q; *q=*t; **p=**p-**q; }

4/17/2019 5:04:21 PM

Satyajeet Kumar

1 Answer

New Answer


the function part is use to swap 2 numbers, if you understand pointer, explaining further won't be a problem but am just kind of lazy to type😉😉😉