Question: Please modify my code according to the lab instructions thanks #include #include #include #include void getRandomString ( char str [ ] ) { int i;
Please modify my code according to the lab instructions thanks
#include
#include
#include
#include
void getRandomStringchar str
int i;
for i ; i ; i
striArand;
stri;
int getUserInputchar str
printfEnter a string: ;
scanfs str;
int len strlenstr;
if len len
return ;
else
return ;
void strfilterchar s char s char ch
int len strlens len strlens i j;
for i ; i len; i
for j ; j len; j
if si sj
si ch;
break;
int main
srandtimeNULL;
char s s s;
char ch;
getRandomStrings;
while
strcpys s;
if getUserInputs
printfEnter a replacement character: ;
scanfc &ch;
strfilters s ch;
printfss
s;
printfss
s;
printfc c
ch;
printffiltered ss
s;
printfDo you want to try again: ;
scanfc &ch;
if ch Y && ch y
break;
else
printfError: Input string is too large
;
return ;
Objective
To gain experience in the use of pointers and pure pointer notation.
Assignment
Modify lab B by replacing all array notations with pure pointer notations. However, arrays must still be defined. No subscripts in functions.
Run
The program multiple times with different user entered string and replacement characters showing all test cases and scenarios including invalid strings.
Turn In
Turn in source code and output file.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
