diff --git a/Cpp/fstream.cpp b/Cpp/fstream.cpp new file mode 100644 index 0000000..7d5e1c5 --- /dev/null +++ b/Cpp/fstream.cpp @@ -0,0 +1,23 @@ +#include +#include +using namespace std; +int main() +{ + ofstream outf("student"); + int no; + char name[30]; + cout<<"Enter Roll Number:-\n"; + cin>>no; + cout<<"Enter Name:-\n"; + cin>>name; + outf<>no; + inf>>name; + cout<<"\n Roll Number is "<