Code:#include<iostream> #include<fstream> #include<iomanip> #include<string> #include<cstdlib> usingnamespace std; void getFileName(ifstream& input) //opens file { string fileName; cout << "Enter the file name: "; cin >> fileName; input.open(fileName.c_str()); if( !input ) { cout << "Incorrect File Path" << endl; exit (0); } } void countWords(ifstream& input) //counts words in file { bool notTrue = false; string words; int i = 0; while( notTrue == false ) { if( input >> words ) { i++; } elseif( !(input >> words) ) notTrue = true; } cout << "There are " << i << " words in the file." << endl; } void countChars(ifstream& input, char storeCharacters[]) //counts amount of characters in file { int i = 0; int counter = 1; string line; for( i=0; i<counter; i++ ) { input.get(storeCharacters[i]); counter++; if ( !input ) counter--; } } void sortChars() //sorts characters { } void printCount() //prints { } int main() { ifstream input; ofstream output; char storeCharacters[] = {0}; getFileName(input); countWords(input); countChars(input, storeCharacters); return 0; }