Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Design and write a C program that performs the following functionality: 1. Read first name and last name from the command line when you
Design and write a C program that performs the following functionality: 1. Read first name and last name from the command line when you call the program executable. Example: testq2.exe Firstname Lastname 2. Check if sufficient number of input arguments have been entered. 3. If insufficient number of input arguments have been entered, write an error message and exit the program by returning minus (negative) one (-1). 4. Prompt the user to enter a string. Note: the string can contain spaces. 5. Read and store the string that can contain spaces. 6. Determine the length of the string. 7. Loop through each character in the text. 8. If the character is a vowel, replace the vowel with an integer number according to the rules in the table below: A or a E or e I or i O or o U or u 1 2 4 9. Hint: if the character is a vowel, then replace with the character representation of the number. For example, if the character is 'e', then replace 'e' with '2'. 10. Count the number of replacements of a vowel with a number 11. After checking the entered string and replacing all vowels print the first name, last name and the string without vowels on the first line and the number of vowels on the second line as follows: Captain Africa - the string without vowels is: L21rn3ng t4 pr4grim 3s I vl151bl2 1312 sk311 thit 4p2ns m5lt3pl2 cir22rs The string has 24 vowels 12. Return zero (0) and exit the function. 12. Add the detailed algorithm design steps in the Word document. 13. Write and compile your code 14. Copy the code from IDE into Notepad to remove formatting and then copy and paste from Notepad into the Word document. 5
Step by Step Solution
★★★★★
3.39 Rating (158 Votes )
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