+1

Why in this code, an asterik has come after int ?

void swap( int* a, int* b) { int temp = *a; *a = *b; * b = temp; }

c

4/17/2019 8:33:26 AM

Aryaveer Singh Rawat

2 Answers

New Answer

+6

Review the pointers section of the c course. https://www.sololearn.com/learn/C/2933/?ref=app

+4

a and b are pointers to integers which means that they are varaiables that contain the addresses of integer variables.