subject

No library functions may be used in these programs except input and output functions such as getchar, putchar, gets, puts. LAB 4B Objective: To gain experience in using arrays, strings, and functions. Problem definition: Plan, code, and execute a C program to a) code a function to generate a string, sl, containing a random pattern of upper case letters 'A'-Z. (length 40 characters) b) code a function to allow the user to enter a string, s2, (minimum length 2 characters, maximum length is 20 characters, actual length is user's choice) containing a random pattern of upper case letters A-Z and then a replacement character, c. c) code a user defined function, strfilter(s1,52,c) that searches sl and replaces any occurrences of any of the characters contained in s2 with the character c. d) output the generated string, the 'user entered' string, and the filtered string from the main program. sl -{""} s2 - {"AL") C - (**) filtered sl - {"FJK SIOEFN***KJVOIUP'WENFK KYUFGIOE*PVNO*') Allow the user to enter multiple strings, (s2), if desired. Use the original random string for all comparisons. To create the generated pattern use the library function RAND which generates pseudorandom numbers from 0-32767. The modulus operator can be used to change the range to 0-25. This should be done in a function. Generate the random string only once. Remember: STRINGS MUST TERMINATE WITH \0'. DO NOT USE POINTER NOTATION OR GLOBALS IN THIS LAB (4B). ex. LAB 5B Objective: To gain experience in the use of pointers. Problem definition: Modify lab 4 by replacing all array notation with pointers notation. However arrays must still be defined. No subscripts in functions. USE PURE POINTER NOTATION

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:40
Sarah is having a hard time finding a template for her advertising business that she may be able to use at a later date and also make it available to her colleagues
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Anetwork security application that prevents access between a private and trusted network and other untrusted networks
Answers: 1
question
Computers and Technology, 23.06.2019 19:00
Write a program that displays the following menu: geometry calculator 1. calculate the area of a circle 2. calculate the area of a rectangle 3. calculate the area of a triangle 4. quit enter your choice (1-4): if the user enters 1, the program should ask for the radius of the circle and then display its area. use the following formula: area = ď€(the square of r) use 3.14159 for ď€ and the radius of the circle for r. if the user enters 2, the program should ask for the length and width of the rectangle and then display the rectangle’s area. use the following formula: area = length * width if the user enters 3, the program should ask for the length of the triangle’s base and its height, and then display its area. use the following formula: area = base * height * .5 if the user enters 4, the program should end. input validation: display an error message if the user enters a number outside the range of 1 through 4 when selecting an item from the menu. do not accept negative values for the circle’s radius, the rectangle’s length or width, or the triangle’s base or height. note: if the user enters an improper menu choice (1-4), the program prints "the valid choices are 1 through 4. run the program again and select one of those." if the user enters a negative radius, the program prints "the radius can not be less than zero." if the user enters a negative value for height or base, the program prints "only enter positive values for base and height."
Answers: 1
question
Computers and Technology, 24.06.2019 09:40
Healthy study habits are best described as
Answers: 1
You know the right answer?
No library functions may be used in these programs except input and output functions such as getchar...
Questions
question
Mathematics, 18.10.2020 15:01
question
Chemistry, 18.10.2020 15:01
Questions on the website: 13722360