Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- FILE *plik;
- char nazwa[256];
- printf("Podaj nazwe pliku: ");
- scanf("%s",&nazwa);
- plik = fopen(nazwa,"r");
- if(plik == NULL)
- {
- perror("Nie udalo sie otworzyc pliku");
- return 1;
- }
- printf("Plik %s otwarty pomyslnie\n",nazwa);
- fclose(plik);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement