Answer to Question #212683 in C++ for champu

Question #212683

to write a C++ program which will read the given text file and will produce an

output text file with the name “Email_IDs” which must contain the valid email addresses of

the students mentioned in the input text file.


1
Expert's answer
2021-07-03T04:48:40-0400
#include <fstream>

using namespace std;

int main() {
  string line;
  ifstream in('input.txt');
  ofstream out('Email_IDs');
  if (in.is_open()) {
    while (getline(in, line)) {
      out << line << "\n";
    }
  }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS