Question: Instructions Write a program that reads in a line consisting of a Student's name, Social Security number, user ID, and password. The program outputs the

Instructions Write a program that reads in a line consisting of a Student's name, Social Security number, user ID, and password. The program outputs the string in which all the digits of the Social Security number and all the characters in the password are replaced by x. (The Social Security number is in the form DDD-BB-600, and the user ID and the password do not contain any spaces. Your program should not use the operator [] to access a string element. Use the appropriate functions described in Table 7.1 below. Expression Effect Str Varal[index) SLrVarfindex] Returns the element at the position specified by index Returns the element at the position specified by index Appends n copies of ch to strVar, where ch is a char variable or a char constant StrVar.appendin,ch) StrVar.append(s) Appends str lo str Var SLrVar.clear) Deletes all the characters in strVar SLrVar.compare(s) Str Varemply) Str Var.erasel StrVar.eraselpos, ni Returns 1 if strVar> str returns O if strVar -- str; returns-1 if strVar
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
