+ 1
If an array in c behaves like an pointer, it is any use to initialize a pointer to the array?
2 odpowiedzi
+ 2
Using pointer notation is quicker than array notation (apparently), ..plus you can't increment/decrement (++/--) an array name but you can increment/decrement a pointer..example:-
int myArr[] = {1,2,3,4,5,6};
int *pmyArr = myArr;
printf("%d", ++myArr); // <- you can't do this...but..
printf("%d", *++pmyArr); // <- you can do this.
although..
printf("%d", *(myArr+1)); // <- you can do this.
+ 2
Hey Cristian Daraban your question seem unclear if you dont mind putting it to code