Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(void)
- {
- FILE * fp;
- char * line = NULL;
- size_t len = 0;
- ssize_t read;
- fp = fopen("Ścieżka/zjebie", "r");
- if (fp == NULL) // Sprawdza czy otwiera
- exit(EXIT_FAILURE);
- while ((read = getline(&line, &len, fp)) != -1) {
- printf("Dlugosc lini %zu :\n", read);
- printf("%s", line);
- }
- fclose(fp);
- if (line)
- free(line);
- exit(EXIT_SUCCESS);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement