Question: I am unable to correct this error with the code below: #include #include #include void CreateAcronym ( char userPhrase [ ] , char userAcronym [
I am unable to correct this error with the code below:
#include
#include
#include
void CreateAcronymchar userPhrase char userAcronym
int j ;
int newWord ; Flag to check if we are at the start of a new word
for int i ; i strlenuserPhrase; i
if isupperuserPhrasei && newWord
userAcronymj userPhrasei;
userAcronymj;
newWord ; Reset flag after adding the first uppercase letter
else if userPhrasei
newWord ; Set flag when a space is encountered
userAcronymj; Nullterminate the string
int main
char userPhrase;
char userAcronym;
printf;
fgetsuserPhrase stdin;
userPhrasestrcspnuserPhrase
; Remove newline character
CreateAcronymuserPhrase userAcronym;
printfs
userAcronym;
return ;
IG#
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
