Help me in solving DSAAGP31 problem

My issue

shows runtime error

My code

#include <stdio.h>

int main(void) {
	// your code goes here
int N,M;
//printf("enter the value of N:");
scanf("%d",&N);
//printf("enter the value of M:");
scanf("%d",&M);
int arr[N][M];
//to input elements that is total elements=N*M 
for(int i=0; i<N; i++){
    for(int j=0;j<M;j++){
        //printf("element[%d][%d]:",i,j);
        scanf("%d",&arr[i][j]);
    }
}
//output
//printf("the 2d array is:");
for(int i=0;i<N;i++){
    for(int j=0;j<M;j++){
        printf(arr[i][j]);
    }
}
return 0;
}


Learning course: Data structures & Algorithms lab
Problem Link: https://www.codechef.com/learn/course/muj-dsa-c/MUJDSAC08/problems/DSAAGP31