Hello.
Although I've already spotted this thread "Initializing a 2D array dynamically allocated" I could not understand why following code gets not compiled with GCC (C99-standard):
Code:#include <stdio.h> #include <stdlib.h> int main (void) { int *array = malloc(2*sizeof(int)); array = {2,1};//error: expected expression before ‘{’ token free(array); return EXIT_SUCCESS; }