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){
- argv[0] = "/home/thieumao/Desktop/thieumao.txt";
- FILE*fd=fopen(argv[0],"r");
- if(fd==NULL) {
- puts("error open file");
- exit(1);
- }
- int ch;
- while((ch=fgetc(fd))>0){
- putchar(ch);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment