OOCP4-5

//BCA Support //www.bcasupport.xyz #include <iostream.h> #include <conio.h> #include <fstream.h> int main() { clrscr(); char c1='h',c2='i',c3,c4,line[50]; ofstream fout("file.txt"); fout.put(c1); fout.put(c2); fout<<"\nBCA Support"; fout.close(); ifstream fin("file.txt"); fin.get(c3); fin.get(c4); cout<<c3<<c4; fin.getline(line,20,'\0'); //getline(string,char to read,delimiter) cout<<line; getch(); return 0; }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.