I am creating a menu driven using switch case, I entered information in the first case, which I then want to display when I exit that case. Now I want to display the information in my second case.
How do you use a string copy?
Collapse
X
-
Please provide a concrete example of what you want to do. Typically you need a loop that repeatedly executes the switch statement in order for more than one case to execute. The order of cases in your source code does not necessarily correspond with the order that the cases execute when the program runs. -
This is for the first case.
For each application,the system should prompt the user for the:
Student’s Name.
This is for the second case.
The program should simply display the following for each student:
Student Name
So, upon entering the information using an array, how do I get to display what has been entered in the first case into the second after exiting the first case?Comment
-
-
The array where you store the entered information needs to be accessible to both cases. Furthermore, you need to insure that it is either impossible to execute the second case before the first; or if that happens, to prevent the second case from accessing the uninitilized array.Comment
Comment