Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- main()
- {
- char* lines[3];
- char line[1024];
- int n = 0;
- while(n < 3 && fgets(line , 1024 , stdin) != NULL){
- lines[n] = strdup(line);
- printf("%d : %s\n",n,lines[n]);
- n++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement