Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Hi, okay I'm suppose to write a program that takes a text file(inputFile.txt) with a set format then the compiler will take the data and display it in a different format.
The original format is:
Name: John Milton
Name: Karl Lewis
Name: Homer Simpson
and its suppose to look like this:
Name: Major: GPA:
John Milton EE 3.98
Karl Lewis CS 3.6
Homer Simpson CE 4.0#include
fp = fopen( "C:\inputFile.txt", "r" );
if(c == EOF)
printf("file does not exist.");
while(c != EOF)
c = getc(fp);
fclose( fp );
I got this so far but I dont know how to format into a different way. Any help on what to do next?