Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //count no of words
- #include<conio.h>
- #include<fstream.h>
- #include<ctype.h>
- void main()
- {
- clrscr();
- int p=0;
- ofstream ofile;
- ofile.open("adil.txt");
- ofile<<"hello people adil here";
- ofile.close();
- ifstream ifile;
- ifile.open("adil.txt");
- char ch[40];
- while(!ifile.eof())
- { ifile>>ch;
- p++;
- };
- cout<<p;
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement