Whenever I attempt keyboard input into some char arrays, my program ends up crashing.
What's a straightforward way of reading char arrays from the keyboard and saving them?
int main() {
int pos;
char *labels[8];
for (pos=0; pos<8; ++pos) {
scanf("%s",labels[pos]);
}
for (pos=0; pos<8; ++pos) {
printf("%s\n",labels[pos]);
}
return 0;
}