Question: 1 6 . 1 2 The following code reads a string from the keyboard and prints out a version with any uppercase characters converted to
The following code reads a string from the keyboard and prints out a
version with any uppercase characters converted to lowercase.
However, it has a flaw. Identify it
#include
#define MAXLEN
char LowerCasechar s;
int mainvoid
char strMAXLEN;
printfEnter a string : ;
scanfs str;
printfLowercase: s
LowerCasestr;
char LowerCasechar s
char newStrMAXLEN;
for int index ; index MAXLEN; index
if A sindex && sindexZ
newStrindex sindexaA;
else
newStrindex sindex;
return newStr;
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
