Project #13421 - C++

3.10A Write a program that will input three c-strings into an array of c-strings.  Print only those that end in "es" or begin in "yan".  Use the following:
First, use a c-string function to find the length so you know where the last two characters are, then compare the last two characters separately. 
Second, use a c-string function to compare, all at once, just the first three characters in the c-string (a function similar to strcmp, but that will only compare a certain number of characters).

 

3-10B. Modify exercise 3-10 part a into exercise 3-10 part b. Use string objects instead of c-strings.  Input three strings into an array of strings.  Again, use the following:
First, use a function to find the length for the end comparisons, then again compare the last two characters separately. 
Second, use a string function to take a sub-string of the first three characters for the beginning comparison all at once.

Subject Computer
Due By (Pacific Time) 09/29/2013 12:00 am
Report DMCA
TutorRating
pallavi

Chat Now!

out of 1971 reviews
More..
amosmm

Chat Now!

out of 766 reviews
More..
PhyzKyd

Chat Now!

out of 1164 reviews
More..
rajdeep77

Chat Now!

out of 721 reviews
More..
sctys

Chat Now!

out of 1600 reviews
More..
sharadgreen

Chat Now!

out of 770 reviews
More..
topnotcher

Chat Now!

out of 766 reviews
More..
XXXIAO

Chat Now!

out of 680 reviews
More..
All Rights Reserved. Copyright by AceMyHW.com - Copyright Policy