Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please quickly as soon as possible Write a C++ program that has three files: header, implementation, and main files. The header file contains the following

image text in transcribed

Please quickly as soon as possible

Write a C++ program that has three files: header, implementation, and main files. The header file contains the following functions' protntypes: 1. int stringlength(const char a [J) This function receives a string and returns its length. The length of a string is the number of its characters excluding the null character. (You are NOT AI.IOWFD touse the cstring library.) 2. void lower-venLet ters(char []) This function receives a string and convert each letter that position is even to lower case. Hint: use these functions from the cctype library int toupper (char c) Converts c to its uppercase muivalent if c is a lowercase letter and has an upercase equivalent. If no such conversion is possible, the value relumed is c unchanget. e.g: char upper: upper = toupper(termpi; int tolower (char c) Converts c to its lousercase equivalent if c is a lowercase letter and has an upperease equivaleat. If no such conversion is possible, the value retumed is c unchanged. 3. void print20Array(const int a[][cols], const int r, const int c) This function prints the elements of the 2D array to the screen. 5. void manipulate2DArray(int a[][cols] , const int r, const int c, int n ) This function multiplies n from each elennent in the urruy. - implementation.cpp file contains the definitions for the functions whose prototypesare declared in header.h - In main.cpp: - Define the local array of char (string) and give it an initial value. - Define local 2D array of integer of size 3:3 and give it an initial value. - Test your functions in the main program. A menu-driven program with the following menu could be implemented for this purpose. 1. String Length 2. Convert To Lower Case. 3. Read 2D Array 4. Print 2D Array 5. Manipulate 2D Array 6. Exit. Extra Exercise - Detine a function that receives a 2D array and check whether it is upper triangular or not. Call the function for the integer array defined above. (Hint); Upper triangular motrox is a speciol square motrx whose all eiements below the main dlagonal are zero. array elements: 1ee25&369 Output: It is upper triangular - Define a function that receives a 2D array and find the sum of minor diagonal (opposite diagonal) elements. Call the function for the 2D array defined ahove. array elements: 142536 457869

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

Intelligent Information And Database Systems 6th Asian Conference Aciids 2014 Bangkok Thailand April 7 9 2014 Proceedings Part I 9 2014 Proceedings Part 1 Lnai 8397

Authors: Ngoc-Thanh Nguyen ,Boonwat Attachoo ,Bogdan Trawinski ,Kulwadee Somboonviwat

2014th Edition

3319054759, 978-3319054759

More Books

Students also viewed these Databases questions

Question

$45 is 60% of what amount? 6.

Answered: 1 week ago