Question
Write in c++ please

Transcribed Image Text:CS
1.
Write a program having a String class that contains a function that can reverse the
order of the characters in a string. A palindrome is a word or group of words that
read the carne forward and backward. For example, "madam" or "wow". Write a
program that takes a string argument from the command line and returns TRUE if
the string is a palindrome.
Expert Solution

arrow_forward
Step 1: Summary
I have provided C++ CODE along with CODE SCREENSHOT and OUTPUT SCREENSHOT-----------
Step by stepSolved in 4 steps with 4 images

Knowledge Booster
Similar questions
- QI/ Write a program in c++ which read a sequence of 20 numbers and compute their sum when the sum>= 500 the program must print the sum and stop even if not all numbers are read?arrow_forwardThe question should be done in C++, please give explanation and running result. 1. Let’s write a function that compares 2 strings and returns true if they were identical, false otherwise. The signature of this function should be: bool word_diff(std::string word1, std::string word2); For example: std::string str1 = "Hello World";std::string str2 = "hEllO World";std::string str3 = "World";std::string str4 = "Hello World";bool result = word_diff(str1, str2); // Falsebool result = word_diff(str1, str3); // Falsebool result = word_diff(str1, str4); // True 2. Now let’s follow a classical approach to compare the content of 2 files. We should open each file, read their content word by word and compare them until a first mismatch occurs.Let’s implement a function called classical_file_diff that takes 2 arguments each of which is a file name and returns a boolean indicating whether the 2 files are identical or not. The signature of this function should be: bool…arrow_forwardI want the solution in C++ language i want the solution related to chapter 4 in the 10th edition of the textbook Solving the problems with C++. Also i want the solution that setups the midnight time to 0, and lists all the scenarios (possibilities) from that time and future time within 24 hrs. 4.7: Time Machine Your time machine is capable of going forward in time up to 24 hours. The machine is configured to jump ahead in minutes. To enter the proper number of minutes into your machine, you would like a program that can take a start time (in hours, minutes, and a Boolean indicating AM or PM) and a future time (in hours, minutes, and a Boolean indicating AM or PM) and calculate the difference in minutes between the start and future time. A time is specified in your program with three variables: int hours, minutes; bool isAM; // You can also use a char, i.e. A or P for example, to represent 11:50 PM, you would store: hours = 11,minutes = 50, isAM = false or if using a char, hours =…arrow_forward
arrow_back_ios
arrow_forward_ios