Problem Statement: Writing and Reading student data in a file. Detailed Descript
ID: 3612400 • Letter: P
Question
Problem Statement:Writing and Reading student data in a file.
Detailed Description:
Write a program in which you have to:
1. Create a text file “Student_info”.
2. Using Code Write the following data in it:
Roll NO Student Name Class
101 Ali Raza BS(CS)
102 Usman MS(CS)
103 Faizan BS(CS)
104 Rehan MIT
105 Ahmed MCS
3. Open file and read data from it and display on the screen.
Sample Output
Student Information
Roll NO Student Name Class
101 Ali Raza BS(CS)
102 Usman MS(CS)
103 Faizan BS(CS)
104 Rehan MIT
105 Ahmed MCS
plzzzz solve ths assignment as soon as possible sir ! Problem Statement:
Writing and Reading student data in a file.
Detailed Description:
Write a program in which you have to:
1. Create a text file “Student_info”.
2. Using Code Write the following data in it:
Roll NO Student Name Class
101 Ali Raza BS(CS)
102 Usman MS(CS)
103 Faizan BS(CS)
104 Rehan MIT
105 Ahmed MCS
3. Open file and read data from it and display on the screen.
Sample Output
Student Information
Roll NO Student Name Class
101 Ali Raza BS(CS)
102 Usman MS(CS)
103 Faizan BS(CS)
104 Rehan MIT
105 Ahmed MCS
plzzzz solve ths assignment as soon as possible sir !
Explanation / Answer
please rate - thanks #include #include #include using namespace std; int main() {char filename[30]; int num,i; string name,classs,line; ifstream input; ofstream output; coutfilename; output.open(filename); //open file if(output.fail()) //is it ok? { coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.