Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this part of the lab, you will create a function check Array Sort that checks if an array of strings (which was previously defined

image text in transcribed

In this part of the lab, you will create a function check Array Sort that checks if an array of strings (which was previously defined and initialized) is already sorted, and it is either increasing or decreasing. The function that you create is declared as follows: Input arguments: A string array A (remember that array is a pointer in this case, so use the * sign) an integer variable array_size for the number of elements in array A (the counter value from previous exercise) Return in integer value: -1 if the array is sorted in descending order 0 if the array is not sorted 1 if the array is sorted in ascending order You can modify the main program that you developed in filelO.cpp to call check Array Sort, and to print out one of the following statements: If -1 "The array is sorted in descending order!" If 0 "The array is not sorted!" If 1 "The array is sorted in ascending order!" You can use the same words_in.txt to test your program

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_2

Step: 3

blur-text-image_3

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

Creating A Database In Filemaker Pro Visual QuickProject Guide

Authors: Steven A. Schwartz

1st Edition

0321321219, 978-0321321213

More Books

Students also viewed these Databases questions

Question

1. Identify the sources for this conflict.

Answered: 1 week ago

Question

3. The group answers the questions.

Answered: 1 week ago