Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- int main(int argc, char **argv)
- {
- if (argc != 4)
- {
- exit(1);
- }
- ///argv program klucz wejscie wyjscie
- FILE *wejscie;
- FILE *wyjscie;
- if ((wejscie = fopen(argv[2],"r")) != NULL)
- {
- wyjscie = fopen(argv[3],"w");
- int lenWejscie = 0;
- int lenKlucz = 0;
- char a;
- while (argv[1][lenKlucz] != '\0')
- {
- ++lenKlucz;
- }
- while((a = fgetc(wejscie))!= EOF)
- {
- printf("%c %d",a,a);
- }
- }
- fclose(wejscie);
- fclose(wyjscie);
- }
Add Comment
Please, Sign In to add comment