|
|
denilugito@linux-mrcm:~/Documents/Project/C++ Code/Kumpulan Source/Coba array> ./coba_lagi Bil Modified; 3 Bil Modified; 3 Bil Modified; 3 Bil Modified; 3 Bil Modified; 3 Bil Modified; 3 The different Incrementing the pointer value with pointer address; Bil Modified; 3 Bil Modified; 3 Bil Modified; 4 Bil Modified; 5 Bil Modified; 6 Bil Modified; 7 Bil Modified; 8 Bil Modified; 9 Bil Modified; 10 Bil Modified; 11 Bil Modified; 12 Bil Modified; 13 |
*bil = *(bil + 1);
bil points to arr[0], so (bil+1) points to arr[1]. This line is equivalent to arr[0] = arr[1]. Note that now arr = 3, 3, 4, 5, 6, 7. Thats why you get 3 in the second loop.*bil = *(bil + i);
this line is the same as arr[0] = arr[i]. After the loop arr = 7, 3, 4, 5, 6, 7.*bil = *bil + 1;
this says arr[0]++.