Dain1234 / Design-and-analysis-algorithm

0 stars 0 forks source link

reverse string #16

Open Dain1234 opened 2 years ago

Dain1234 commented 2 years ago

image

Dain1234 commented 2 years ago

include

include

int main() { char str[40]; // declare the size of character string printf (" \n Enter a string to be reversed: "); scanf ("%s", str);

// use strrev() function to reverse a string
printf (" \n After the reverse of a string: %s ", strrev(str));
return 0;

}