[Solved]Given File Consisting Students Names Following Form Lastname Firstname Middlename Note Stu Q37107717
You are given a file consisting of students’ names in thefollowing form: lastName, firstName middleName. (Note that astudent may not have a middle name.)
Write a C++ program that converts each name to the followingform: firstName middleName lastName. Your program must read eachstudent’s entire name in a variable and must consist of a functionthat takes as input a string, consists of a student’s name, andreturns the string consisting of the altered name. Use the stringfunction find to find the index of ,; the function length to findthe length of the string; and the function substr to extract thefirstName, middleName, and lastName.
Expert Answer
Answer to You are given a file consisting of students’ names in the following form: lastName, firstName middleName. (Note that a… . . .
OR

