Last active
August 16, 2018 21:03
-
-
Save EvanCarroll/ee2d2310f6dc7320bc296ebc15b9fd45 to your computer and use it in GitHub Desktop.
Why C is impossible to teach?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int a[2][2] = {{1,2},{3,4}}; | |
int (*b)[2] = a; | |
int main () { | |
printf("%d\n", *b[1]); | |
printf("%d\n", (*b)[1]); | |
printf("%d\n", (*b+1)[1]); | |
printf("%d\n", (*(b+1))[1]); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment