Write a function called Reverse() which takes a string as a parameter. The function should convert all lower case letters to upper case and upper case letter to lower case.
1
Expert's answer
2011-03-07T09:05:52-0500
// Lowercaseletterstoupper.cpp : Defines the entry point for the console application.// #include "stdafx.h" #include #include #include using namespace std;
char str[80]; char string; int i;
void Reverse(char str[80]){ for( i = 0; str[ i ]; i++){ str[ i ] = toupper( str[ i ] ); } printf("Uppercase string is - %s ", str); /* uppercase string */
for(i = 0; str[ i ]; i++){ str[i] = tolower(str[ i ]); } printf("Lowercase string is - %s ", str); /* lowercase string */ }
int _tmain(int argc, _TCHAR* argv[]) { printf("Enter a string: "); Reverse(gets(str)); getch(); return 0; }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment