Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main ( void ) {
- int sor = 0;
- static const char filename[] = "file.txt";
- FILE *file = fopen (filename, "r");
- if (file != NULL) {
- char line [128];
- while (fgets(line, sizeof line, file) != NULL) {
- if (sor==1)
- printf("Második sor:\n");
- printf ("%s",line);
- sor++;
- }
- fclose (file);
- printf ("\n");
- } else {
- printf ("Hiba az állomány megnyitásakor !\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement