+ 1
Why we are not using * before arr in c programming?
1 Antwort
+ 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