Question: The programmer expected myString to contain the phrase Girls and Boys but instead only holds Girls. Why? ( hint - it's a really annoying thing

The programmer expected myString to contain the phrase "Girls and Boys" but instead only holds "Girls". Why? (hint - it's a really annoying thing about entering data)
User input: Girls and Boys
1 char mystring [12]:
3 scanf ("%s", mystring):
myString must be preceded by an ampersand ( & )
scanf stops reading a string at the first whitespace
The variable mystring was improperly declared
The "%s" parameter should be "%ws"
 The programmer expected myString to contain the phrase "Girls and Boys"

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!