Question: In a computer program where the characters are exactly as shown, which word would be listed first and why? word 1 = kangaroo word 2

In a computer program where the characters are exactly as shown, which word would be listed first and why?
word1= "kangaroo" word2= "Teddy"
Multiple choice question.
Teddy would be first because uppercase letters have smaller ASCII codes than lowercase.
kangaroo would be first because the computer would compare word1 and word2 and 1 comes before 2.
Teddy would be first because it is a shorter string than kangaroo.
kangaroo would be first because "k" comes before "T" in the alphabet.

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 Programming Questions!