Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a C program that prompts the user to enter the number of the line that he/she would like to read, then, the program read
Write a C program that prompts the user to enter the number of the line that he/she would like to read, then, the program read the selected line from a text file named infile.txt. The infile.txt contains a list of persons first names. After that, the program displays the read name using starts (*) (Hint: declare an empty string and then fill it with starts based on the number of the letters in the read name and print it).
Finally, the program prompts the user to enter a letter (for example a) and if the letter exists in the read name, the program displays the message The selected first name has the letter a. Otherwise, the program displays the message The selected first name does not have the letter a
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started