Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Practice 02: Working with array of character (10 marks) 1. Study the program 6.2 (in appendix) to understand the task performed and how arrays of

image text in transcribedimage text in transcribed

Practice 02: Working with array of character (10 marks) 1. Study the program 6.2 (in appendix) to understand the task performed and how arrays of characters are created. Then, copy, compile and run the program of Program 6.2. Type computer. when ask for input. The program will produce the following output (Figure 6.3). Enter up to 10 characters. (Enter to stop the input): computer - Display in reverse order retupmoc Press any key to continue ... Figure 6.3: Output program 6.2 3 2. Now, without changing the original code of the program, add a user-defined function 2. Now, without changing the original code of the program, add a user-defined function named originalOrder. The function receives the elements of array. Then, it writes the letters back to the screen in its original order. Figure 6.4 shows the expected modified final output of the Program 6.2. Answer the question 1) to (ii). li) Provide C++ statement for: (a) function CALL to originalOrder (3 marks) (b) function PROTOTYPE of originalOrder (3 marks) ) Provide C++ fragment codes for function definition of originalOrder (4 marks) 3. Compile and run the completed modified program of Figure 6.2. Type computer. when asked for input. The program is expected to produce the following output (Figure 6.4). Enter up to 10 characters. (Enter to stop the input): computer. Display in reverse order retupmoc Display in original order ------- computer Press any key to continue.. Figure 6.4: Expected output of modified Program 6.2

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

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

More Books

Students also viewed these Databases questions

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago