visual studios c restrictions 1 no global variables 2 no labels or go to statements 4946939
Visual studios C++
Restrictions : 1. No global variables 2. No labels or go to statements 3. No infinite loops for(;;) while(1) while(true) do{//code}while(1); 4. Break statements cannot be used to exit loops 5. No vectors 6. Try hard not to use strings. Avoid if you can.
Design a program that Asks the user to enter his/her name AND validates it Once the name is validated, the program prompts the user toenter anything (s)he wants until the user types -1. The program must create a text file with the user’s name ANDstore EVERYTHING the user types in it. ( sidenote : how do you store information from conditional ifelse statements? ) The program must then read the contents of the file and countthe number of even digits and the number of odd digits The program should display the number of even digits if thereare any; otherwise it should indicate that there are no evendigits. The program should display the number of odd digits if there areany; otherwise it should indicate that there are no odd digits. It is VERY important that the program also
include thefollowing functions: void validateUserName(
which parameters? pass byreference or by value?);//validate user name void checkEvenDigit(
which parameters? pass byreference or by value?);//check for the presence ofeven digits void checkOddDigit(
which parameters? pass byreference or by value?);//check for the presence ofodd digits void createFile(
which parameters? pass by referenceor by value?);//create userFile void writeDataToFile(
which parameters? pass byreference or by value?);//write to the file void readDataFromFile(
which parameters? pass byreference or by value?);//read from the file void displayResults(
which parameters? pass byreference or by value?);//display results The main() function should consist mostly of local variabledeclarations and a series of function calls. One of the objectivesof the quiz is to get you to “modularize” your programs usingfunctions—hence main() must necessarily be very short! . . .