I use this code, but it's not working.
#include <stdio.h>
#include <string.h>
int main() {
    char c, *strx = 0;
    c = getchar();
    while(c != '\n') {
        strx = strcat(strx, &c);
        c = getchar();
    }
    printf("%s\n", *strx);
    return 0;
}
How can I put a word into a string?
 
     
    