+ 1

Why we are not using * before arr in c programming?

23rd Jan 2018, 5:28 AM
Devi
Devi - avatar
1 Respuesta
+ 3
If you meant when we use "[]", there are two reasons : - when we declare an array using those brackets, we declare it as static, meaning its size is known at compile time - when we access an array's values using those brackets, we just want to write less character an be more readable. For this second case, you can either use : arr[i]; *(arr + i); They are the same
23rd Jan 2018, 5:48 AM
Baptiste E. Prunier
Baptiste E. Prunier - avatar