2006-08-03

Arrays in C

Ha-ha-ha, the expression 3["magic"] is correct enough :)

#include <stdio.h>

int main(int argc,char* argv[]) {
int a = 3["magic"];
int b = *(3+"magic");
int c = "magic"[3];

printf("a = %d\nb = %d\nc = %d\n",a,b,c);
}

No comments:

Post a Comment