Qualcomm Interview Question

white board: swap the values of two pointers without a temp variable

Interview Answers

Anonymous

Mar 30, 2018

*a = (*a) *(*b) *b = (*a)/(*b) *a = (*a)/(*b)

Anonymous

Feb 25, 2021

*d=(*c+*d)-(*c=*d);

Anonymous

Nov 28, 2017

*a = *a +*b; *b=*a-*b; *a=*a-*b;