Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char *line = NULL;
- int read = 0;
- while (read != -1) {
- puts("enter a line");
- read = getline(&line, 0, stdin);
- printf("line = %s", line);
- printf("line length = %zun", read);
- puts("");
- }
- free(line);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement