Question: Use C-strings instead of strings library to solve the same problem above (Prog. Ex. 7.8). Do not use the c-string library functions. Write your own

Use C-strings instead of strings library to solve the same problem above (Prog. Ex. 7.8). Do not use the c-string library functions. Write your own functions that you need. You are allowed to use cin.getline(). Your program must be able to process multiple lines in the input. Also, I will put a special indicator for end of input (first name will be "quit"). So, process all the lines in the input file until the first name in the line is "quit".

Exercise 7-8: Write a program that reads in a line consisting of a students 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 000-00-0000, and the user ID and the password do not contain any spaces.) Your program should not use the operator [] to access a string element.

I solved exercise 7-8 by using code:

Use C-strings instead of strings library to solve the same problem above

I don't know how to solve this problem by using c-string instead of string library.

1 E#include 2 #include using namespace std; 4. aint main() string strVar; int name, ssn, userID, password, n; char ch -"x' while (1) f 6 8 9 18 cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!