Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<stdlib.h>
- int main(int argc, char *argv[])
- {
- FILE *fp1;
- char ch1;
- long long ll;
- if((fp1=fopen(argv[1],"rb"))==NULL)
- {
- puts("Error opening file\n");
- exit(1);
- }
- while(!feof(fp1))
- {
- ch1=fgetc(fp1);
- if(ferror(fp1))
- {
- puts("Error reading file\n");
- exit(1);
- }
- printf("%c",ch1);
- }
- fclose(fp1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement