Design and write a C program that performs the following functionality: 1. Read first name and...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 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
Expert Answer:
Related Book For
Posted Date:
Students also viewed these programming questions
-
Design and write a C program that performs the following functionality: 1. Read your student number on the command line when you call the program executable. Example: testq1.exe 201314493 2. Check if...
-
Write a C program by using function to reverse two number and sum them and reverse the result.
-
Write a c program to implement phone book dictionary using Binary Search Tree which provides following operations: (a) add new entry in phone book, (b) remove entry from phone book, (c) search phone...
-
QUESTION 5 Discuss the difference between the following:(a) Functional & non-functional requirements(b) User & system requirements T T T Arial ABC 3 (12pt) T Path: p Words:0
-
Refer to Exercise 9.5. Explain what each of the following would mean. a. Type I error b. Type II error c. Correct decision Now suppose that the results of carrying out the hypothesis test lead to...
-
Activity-based costing, service company Quikprint Corporation owns a small printing press that prints leaflets, brochures, and advertising materials. Quikprint classifies its various printing jobs as...
-
Serum cholesterol levels (y) and age in years (x) were recorded for several men in a medical center. Cholesterol levels were measured in milligrams per deciliter. The following MINITAB output...
-
Mullineaux Corporation has a target capital structure of 70 percent common stock, 5 percent preferred stock, and 25 percent debt0 its cost of equity is 14 percent, the cost of preferred stock is 6...
-
What must be the price of a $1,000 bond with a 5.8% couponrate, annualcoupons, and 15 years to maturity if YTM is 7.8 % APR?
-
Iranzo Ammunition is an all-equity firm that currently has 6,000,000 shares outstanding worth $50 per share. The company's considering converting to a capital structure that is 50.0% debt. The firm...
-
Discuss the importance of the Time Value of Money concept, and why cash flow in the future is worth less than the same amount today.
-
Wildhorse Company has a unit selling price of $720, unit variable costs of $380, and fixed costs of $196,520. Compute the break-even point in sales units using (a) the mathematical equation and (b)...
-
On 1 January 2019 the carrying value of equipment was R19 720 (cost price, R25 670 and accumulated depreciation, R5 950). On 1 January 2019 equipment costing R5 670 was purchased (not included in the...
-
AT-bill with a face value $10,000 and 120 days to maturity is selling at a bank discount ask yield of 2%. a. What is the price of the bill? b. What is its bond equivalent yield?
-
a. If =2.5, find P(X = 8). c. If = 0.5, find P(X = 3).
-
1.Is the use of AI technology for work automation unethical? Why or why not? 2.Is the use of AI technology for work automation unethical? Why or why not? 3.Why should businesses and governments find...
-
The times-interest-earned (TIE) ratio shows how well a firm can cover its interest payments with operating income. Compare the income statements of Blue Moose Producers and Purple Panda Importers and...
-
r = 0.18 Find the coefficients of determination and non-determination and explain the meaning of each.
-
Suppose Ãgn = (ngn. Let the eigenfunctions gn be expanded in terms of the complete orthonormal set {(i} according to
-
For the H2 ground electronic state, D0 = 4.4781 eV. Find Ho0 for H2(g) 2H(g) in kJ/mol.
-
Use Fz,a = -U/za and to show that in Fig. 14.4, Fz,a = -(U/R)[(za- zb)/R]. Find a similar equation for Fz,b and verify that Fz,a = -Fz,b. (, , )
-
How does electronic commerce differ from EDI? What are the implications of these differences to the control and auditability of a company?
-
A company involved in e-commerce would expect a firewall to do all of the following except: a. Intercept traffic that meets specific criteria and send the traffic back to the originator of the...
-
To obtain evidence that user identification and password control procedures are functioning as designed, an auditor would most likely a. Attempt to sign onto the system using invalid user...
Study smarter with the SolutionInn App