I have written a following code (see code comments for the question),
#include<stdio.h> int main() { int size; scanf("%d",&size); int arr[size]; /*is it a valid statement?*/ for(int i=1;i<=size;i++) { scanf("%d",&arr[i]); printf("%d",arr[i]); } return 0; }