/******************************************************************************
Online C Compiler.
Code, Compile, Run and Debug C program online.
Write your code in this editor and press "Run" button to compile and execute it.
*******************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#define CAPACITY 2
int main()
{
int *array = malloc(CAPACITY * sizeof(int));
array[0] = 1;
array[1] = 2;
array[2] = 3;
array[3] = 4;
for (int i = 0; i < 4; ++i) {
printf("\n%d\n", *array + i);
}
free(array);
return 0;
}