Here is a program:
int main(int argc, char **argv) { int *arr = NULL; arr = malloc(2 * sizeof(*arr)); arr[0] = 1; arr[1] = 2; return 0; //