Question
Write a C++ program in a file called pp8a.cpp to ask the user for two words, then print them out in alphabetical order using strcmp.
Write a C++ program in a file called pp8a.cpp to ask the user for two words, then print them out in alphabetical order using strcmp.
) Execute your program and compare its output to the Expected Output column.
Input | Expected Output |
Enter hello for the first word and help for the second | Enter first word: hello Enter second word: help hello help |
Enter help then hello | Enter first word: help Enter second word: hello hello help |
Enter hello then hello | Enter first word: hello Enter second word: hello hello hello |
Enter hello and HELLO [Note how uppercase letters have a smaller ASCII value than lowercase letters] | Enter first word: hello Enter second word: HELLO HELLO hello |
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 StartedRecommended Textbook for
The Science And Engineering Of Materials
Authors: Donald R. Askeland, Wendelin J. Wright
7th Edition
1305076761, 978-1305076761
Students also viewed these Databases questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App