Consider the following code fragment.
```
char str[10];
scanf("%s", str);
```
What will happen if scanf encounters the string "vivaciously" when scanning a value for str?
a. Since there is not enough room in str for the whole string, only "vivacious" will be stored in str.
b. Function scanf will store the entire string "vivaciously", even though there is insufficient space in str. The string will overflow str.
c. The program will abort with an error message.
d. Only "vivacious" will be scanned and stored, leaving "ly" on the input line.
e. None of the above.
b. Function scanf will store the entire string "vivaciously", even though there is insufficient space in str. The string will overflow str.
You might also like to view...
High-level languages are used to develop applications, games, Web apps, and most other software.
Answer the following statement true (T) or false (F)
The Click to open Gradient Picker list arrow is located on the Options bar.
Answer the following statement true (T) or false (F)
In the accompanying figure of a Microsoft Word 2016 document, which of the following boxes is pointing to the Shading button arrow??
?
A. ?Box A B. ?Box B C. ?Box C D. ?Box D
The oldest Telnet server, found on UNIX and Linux systems, is ____________________.
Fill in the blank(s) with the appropriate word(s).