source file name: File4.cpp #include <fstream.h> #include <iostream.h> #include<conio.h> int main () { char str[75]; ofstream fout; fout.open("testout.txt"); clrscr(); cout <<"Writing to a text file:" << endl; cout << "Please Enter your n…
Read more
Showing posts from May, 2022Show all
source file name: OOfiles.cpp #include <iostream.h> #include<stdio.h> #include<conio.h> #include<iomanip.h> #include <fstream.h> class Student { char name[10]; int rollno; char course[10]; public: void getdata() { cout<<"enter name: "; cin>>name; cout<<&qu…
Read more3) Write a C++ program that integers array transfer odd numbers in ODD file and even numbers in Even file.
BySJN Programming
-
source file name: oddeven.cpp #include <iostream.h> #include<stdio.h> #include<conio.h> #include<stdlib.h> #include <fstream.h> int main() { int num[]={12,11,-50,60,113,178,45,100,145,500}; ofstream fout1,fout2; fout1.open("odd.txt"); fout2.open("even.txt"); …
Read more