Question #3317

Write a program to change the string from upper to lower and lower to upper vice versa.

Expert's answer

#include <iostream>
#include <cstring>
using namespace std;

int main()
{
char str1[] = "hello", str2[] = "WORLD";
strupr(str1);
strlwr(str2);
cout << str1 << " " << str2 << endl;

return 0;
}
LATEST TUTORIALS
APPROVED BY CLIENTS