Name: MOZAR ZARVINOM M.
Subject: ES 132
Course & Year: BSCE 2B Date: MAY 10, 2021
LEARNING MODULE NO. 5 – POST-TEST
Instructions: Answer the following questions as directed. Total of 100 points
1. Write a program using string function that reverses the string.
#include <iostream>
#include <string>
using namespace std;
int main ()
string str;
cout<<" Enter the string: ";
cin >> str;
cout<< "Your string is: "<< str << endl;
str = string (str.rbegin(),str.rend());
cout << "The reverse string is: " << str;
return 0;
RESULT:
Enter the string: MOZART
Your string is: MOZART
The reverse string is: TRAZOM
2. Create a program using string functions to convert a character from uppercase
to lowercase.
3. Create a program using string functions to print the inputted string.
4. Create a program to concatenate two strings using strcat function.
5. Create a program to copy one string to another using strcpy function.
6. Create a program using string function to convert a character from lowercase to
uppercase.
7. Create a program using string function that would join strings.
8. Create a program using string function that would display the length of the string.
9. Create a program using string function that would display if the two strings are
equal/similar or not.
10. Create a program using string function that would merge your first name to your family
name