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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started