Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Note: no library functions may be used in these programs except input and output functions such as getchar, putchar, gets, puts. This includes 2 separate

Note: no library functions may be used in these programs except input and output functions such as getchar, putchar, gets, puts. This includes 2 separate programs on labeled 4b and 5b please post both separately. image text in transcribed
NOTE: No library functions may be used in these programs except inpat and output functions such putchar, gets, puts. LAB 4B Obiective: To gain experience in using arrays, strings, and functions. Plan, code, and execute a C program to a) code a function to generate a string, sl, containing a random patterm of upper case lelters'A'-Z. Problem definiton: length 40 characters) b) code a function to allow the user to enter a string, s2, (minimum length 2 characters, maximunm 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,s2,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. s2-(AL) filtered s 1-{TJK" SIOEN.. *KJVOI UP.VVENFK. . . . KYUFGIOE' PVNO"7 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 1. DO NOT USE POINTER NOTATION OR GLOBALS IN THIS LAB (4B). LAB 5B Obiective: To gain experience in the use of pointers. Problem definiion: Modify lab 4 by replacing all array notation with pointers notation. However arrays must stll be defined. No subscripts in functions. USE PURE POINTER NOTATION

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

10th Edition

0137916787, 978-0137916788

More Books

Students also viewed these Databases questions

Question

5. Prepare for the role of interviewee

Answered: 1 week ago

Question

6. Secure job interviews and manage them with confidence

Answered: 1 week ago