Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char* string = malloc(100*sizeof(char));
- char c;
- scanf("%c", &c);
- int i = 0;
- while (c!='\n') {
- string[i] = c;
- i++;
- scanf("%c", &c);
- }
- printf("%s", string);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement