"Can i define an array with unknown number of elements ?"
If the number is too large you can input it as string and then accordingly extract digits from it
Something like following :
char buf[128];
int *array;
//fscanf(stdin,"%s",buf);
array = malloc(strlen(buf) * sizeof(int)); //Allocate Memory
int i=0;
do{
array[i] = buf[i]-'0'; //get the number from ASCII subtract 48
}while(buf[++i]); // Loop till last but one