Skip to content

Instantly share code, notes, and snippets.

View Alberdi's full-sized avatar

Marcelino Alberdi Pereira Alberdi

View GitHub Profile
@Alberdi
Alberdi / gist:4635669
Last active December 11, 2015 17:38
2D array usage example in C.
#define N 500
#define M N/2
#include <stdio.h>
int main(int argc, char **argv) {
int C[N][N];
if((&C[M][N+100] == &C[M+1][100]) && (&C[M][N+100] == &(*C)[M*N+N+100])) {
printf("&C[M][N+100] == &C[M+1][100] == &(*C)[M*N+N+100]\n");