Computers and Technology

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

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 13:00, jaelynnm
Donnie does not have powerpoint. which method would be best for elana to save and share her presentation as is? a pdf a doc an rtf a ppt
Answers: 3
image
Computers and Technology, 23.06.2019 15:30, PlzNoToxicBan
The song about casey jones a railroad engineer who gives his life on the job would most likely gall under the folk song category of? a-work song b-nonsense song c-religious song d-ballad
Answers: 1
image
Computers and Technology, 25.06.2019 01:00, vane9317
Why was it important for the date format to be standardized by the international organization for standardization
Answers: 1
image
Computers and Technology, 25.06.2019 05:00, nathan123498
Arun is 5 years older than anu. five years ago, the ratio of their ages was 3: 2 . find their present age
Answers: 2
Do you know the correct answer?
No library functions may be used in these programs except input and output functions such as getchar...

Questions in other subjects:

Konu
Social Studies, 04.04.2020 12:55