Question: Exercise: Please make a file called alphabetical.cpp that contains a function that fits the following spec: Name: alphabetical 2 Arguments: two character sequences (referred to

Exercise: Please make a file called alphabetical.cpp that contains a function that fits the following spec:

Name: alphabetical

2 Arguments: two character sequences (referred to by pointers).

Return: a boolean (true or false), according to whether the first sequence of characters would appear before the second sequence of characters in dictionary (alphabetical) order.

Example: if the first character sequence is "hi", and the character sequence is "bye", and we call alphabetical("hi", "bye"); then the return value should be false.

Example: similarly, if we call alphabetical("bye", "hi"); then the return value should be true.

Example: if we call alphabetical("bye", "ba"); then the return value should be false.

As usual, add code in main() to check that the function seems to work, using the above three cases. Output should be:

0

1

0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!