Answered step by step
Verified Expert Solution
Question
1 Approved Answer
#include void A ( char str [ ] ) { for ( int i = 0 ; str [ i ] ! = '
#include
void Achar str
for int i ; stri; i
if striAstriZ && stria striz
stri;
printfA: s
str;
void Bchar str
int length ;
while strlength
length;
int mid length ;
char temp;
for int i ; i mid; i
temp stri;
stri strmid i;
strmid i temp;
printfB: s
str;
void Cchar str
int length ;
while strlength
length;
int mid length ;
for int i ; i mid ; i
char temp stri;
stri strmid i ;
strmid i temp;
printfC: s
str;
void Dchar str
int length ;
while strlength
length;
int mid length ;
for int i ; i length mid; i
char temp strmid i;
strmid i strlength i ;
strlength i temp;
printfD: s
str;
int main
char original "HelloWorld";
char order "BACD";
printfOriginal: s
original;
for int i ; orderi; i
switch orderi
case A:
Aoriginal;
break;
case B:
Boriginal;
break;
case C:
Coriginal;
break;
case D:
Doriginal;
break;
default:
break;
return ;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started