I am a student who will be a freshman in an university after this summer vacation.I want to learn about computer programing in advance but I run into some problems. Why when I run the program in devc++,the result is -1 and 44? When I read the book called Pointers On C,In the chapter on functions,the book says that the name of array is a pointer,and in C language arr[m]=*(arr+m),and arr[0] is composed by a pointer and a [number],so can I come to a conclusion that (arr+2),which is a pointer,and[0],can compose (arr+2)[0] equaling to *(arr+2+0)?
int main(void)
{
int arr[10];
for(int i=0;i<10;i++)
{
arr[i]=i+1;
}
int b=*(arr+1);
int c=(arr+2)[0];//Is this true?
printf("%d\n",b);
printf("%d",c);
return 0;
}