int main() {
int y;
scanf("%d", &y);
char *array = (char*)malloc (y);
for (int index_y = 0; index_y < y; index_y++)
{
scanf("%c", &array[index_y]);
}
printf("%c test", array[0]);
}
my input is
3
“###”
and array[0]my output is a NULL or \n: ' '
so if i want print my array correctly i must print it from array[1] to array[3];
is there any solution to replace it so i can print it dirrectly from [0] to [2]?