Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(C++)Write a program that will input three c-strings (that could contain spaces) into an array of c-strings. Print only those that end in es or

(C++)Write a program that will input three c-strings (that could contain spaces) into an array of c-strings. Print only those that end in "es" or begin in "yan" but in different ways, treating each c-string first as a character array and second as an entire c-string. For the last two characters, use a c-string function to find the length so you know where the last two characters are, then you can compare the last two characters separately against an e and against an s using []. For the first three characters, 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). Use separate for loops to input and go through the array of three c-strings

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Database Programming With Visual C# .NET

Authors: Ying Bai

1st Edition

0470467274, 978-0470467275

More Books

Students also viewed these Databases questions

Question

Evaluate these combinations: a. C53 b. C109 c. C66 d. C201

Answered: 1 week ago

Question

Explain how cultural differences affect business communication.

Answered: 1 week ago

Question

List and explain the goals of business communication.

Answered: 1 week ago