I have a problem, they gave me a task. They told us that we must use a pointer to put the value from the keyboard to array and then print that array.
I try to create that, but I don't know why this is wrong. I define my array then I get value and put that value into an array.
#include <stdio.h>
#include <stdlib.h>
#define N 10000 // Maximum array size
int main ()
{
char keyboardArray[N];
char *r;
r = keyboardArray;
while( (*r++ = getchar()) != EOF );
printf("You write %s", r);
return 0;
}