runtime error

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
void main()
{
long int n;
scanf("%d",&n);
char** a;
a=(char**)malloc(n* sizeof(char*) );
}
why does this code get runtime error online but works completely fine in offline compiler?
It shows NZEC as error.