Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

question is on picture 2. Chapter 3 - Exercise 10 3-10 a. Write a program that will input three c-strings into an array of c-strings.

image text in transcribedimage text in transcribed

question is on picture 2.

Chapter 3 - Exercise 10 3-10 a. 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 stremp, but that will only compare a certain number of characters) You will search two different ways. Use for loops to fill up the array and to loop through the c-strings for the searches 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

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

Object Oriented Databases Prentice Hall International Series In Computer Science

Authors: John G. Hughes

1st Edition

0136298745, 978-0136298748

More Books

Students also viewed these Databases questions

Question

6. How would you design your ideal position?

Answered: 1 week ago

Question

2. How do they influence my actions?

Answered: 1 week ago