pointer-arithmetic tag

1 questions


1 answers
111 views
0
Why is a[1] == 1[a] in the C array?

It's a code that my friend sent me, saying she found a weird function1[a] It compiles well and executes well.What's going on here?int main(){ int* a = (int*)malloc(sizeof(int)*2); a[0] = 1; a[1] = 2; ...


© 2024 OneMinuteCode. All rights reserved.