General discussion


Can someone help me in my c++ activity about strings

By alucardsol23 ·
This is my basic c++ lesson and i am not good in programming. I am more on designing... Can someone make me a code in this following basic c++ programs?

Thanks i'll w8 ur answers c")

Problem 6. Write a function reverse(str1,str2) which copies str1 into str2 backwards. Here str1 is an input parameter containing the string to be reversed, and str2 is an output parameter containing the reversed string.
Sample calling function:
Char A[9];
Should result in the string reversed having the value ?imperial?. You may assume that the memory for string2 has been allocated and is sufficient to hold output string.
Note: Your main program allows you to input the content of the string or a variable string initialized by a string.

Problem 7. Write a program that allows you to input two string and compare the inputted string. Your program would output, THEY ARE EQUAL or THEY ARE NOT EQUAL. Your function compare(0ne,two) which compares two strings ignoring punctuation and letter case(where one and two are the two strings being compared). If the strings are the same, the function should return 1, else it should return 0. For example, compare(?This and that?, ?this, and THAT!?) should return 1. while compare (?These are not the same?, ?These are the same?) should return 0.

Thanks again

This conversation is currently closed to new comments.

0 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Back to Web Development Forum
0 total posts (Page 1 of 1)  

Related Discussions

Related Forums