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. Its two different programs

Note: NO Library functions may be used in these programs except input and output functions such as getchar, putchar, gets, puts. Its two different programs 4b and 5b please post them separately. Also, read instructions carefully there has to a do while loop in it. image text in transcribed
CS 539 Lab 4B and 5B NOTE: No library funcions may be used in these programs except input and output functions such as getchar, putchar, gets, puts. LAB 4B Obiective: To gain experience in using arrays, strings, and functions. Plan, code, and execute a C program to a a) code a function to generate a string,sl,coutaining a random pattern of upper case lettersA Problem definition dength 40 characters) b) code a function to allow the user to enter a sting.s2 (minimum length 2 characters,maximum length is 20 characters, actual length is user's choice) containing a random patterm o upper case letters A-Zand then a replacement character, c. N Va code a user defined function, strfilterisl.2c) thatsearchessl 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 fitered string from the main program filtered sl - rEJK SIOEFN KIVOIUP WENFK KYUFGIOE PVNO 1 ."J Code-? Allow the user to enter muloiple stings s2 if desired. Us and string for all comparisons. To create the generated pattern use the library function RAND which generates pseudorandom numbers 0-32767. The modulus operator can be used to change the range to 0-25. This should be done in from a function. Generate the random string only once. Remember: STRINGS MUST TERMINATE WITH 10 DO NOT USE POINTER NOTATION OR GLOBALS IN THIS LAB (4B). LAB 5B Obiective To gain experience in the use of pointers. Modify lab 4 by replacing all array notation with pointers notation. No subscripts in functions. USE PURE POINTER NOTATION Problem definition However arrays must sill be defined

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

=+8 Explain the principles of lean accounting

Answered: 1 week ago

Question

Write a reflective essay about supply chain management

Answered: 1 week ago