Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- int txt[100];
- int x = 0;
- system("dir > ausg.txt");
- FILE*fp=fopen("ausg.txt","r");
- if(fp == NULL)
- {
- perror("Error in opening file");
- return(-1);
- }
- do
- {
- x++;
- txt[x] = fgetc(fp);
- printf("%c", txt[x]);
- }while( feof(fp)==0 );
- fclose(fp);
- printf("%c",txt[x]);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement