m with two user defined functions. The first function named “functionWithArray” takes two user input arguments of character types and return True if first argument is smaller than the second argument (alphabetically) and returns False otherwise. Write the second function named “functionWithPointers” which behaves like the first functions but uses pointers to receive the arguments. You may assume that both character arrays contain only lower-case letters, and no blanks or other nonalphabetic characters. Write a suitable Main function to test these two functions. Sample Output: Enter First String: C++Programming

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter6: User-defined Functions
Section: Chapter Questions
Problem 9SA
icon
Related questions
Question

This exercise assesses the skills required to develop user defined functions, and pointers.

The cod must have comment .


Exercise 1
Write a C++ program with two user defined functions. The first function named “functionWithArray” takes two user input arguments of character types and return True if first argument is smaller than the second argument (alphabetically) and returns False otherwise. Write the second function named “functionWithPointers” which behaves like the first functions but uses pointers to receive the arguments.
You may assume that both character arrays contain only lower-case letters, and no blanks or other nonalphabetic characters. Write a suitable Main function to test these two functions.

Sample Output:
Enter First String: C++Programming
Enter Second String: JavaProgramming
According to functionWithArrays: 'c++programming' is smaller than 'javaprogramming'.
According to functionWithPointers: 'c++programming' is smaller than 'javaprogramming'.

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr