Hello, why is it that i can't get string literals and asign them to pointer variables with scanf() and printf()?
Thanks,Code:#include <stdio.h> main() { char * name[3]; /* An array of pointers to characters */ fgets(name[0], 81, stdin); /* Get a string literal */ puts(*name); /* printf("%s\n", name[0]); why won't this function work? It always returns(NULL) */ /* Also, scanf("%s", name[0]); doesnt' work for getting input either */ return 0; }
Tyler