What is accomplished by the call to sprintf in the code fragment below?
```
char ans[20];
int num = 40;
sprintf(ans, "%d to %d", num, num + 10);
```
a. Nothing, the function name is misspelled.
b. It returns as its value the string "40 to 50".
c. It displays first the value of ans and then the string "40 to 50" (without the quote marks).
d. It aborts because the value of ans is garbage.
e. None of the above.
b. It returns as its value the string "40 to 50".
You might also like to view...
To conserve energy, you should use the computer's operating system ________ option to shut down components that are not in use
Fill in the blank(s) with correct word
Which of the following Windows 8 apps involves a password?
A) Windows Defender B) Windows Updates C) File Explorer D) Remote Access
What is the value of the MsgBoxStyle.OKOnly?
A. 0 B. 1 C. 2 D. 3
Note taking software can store notes in handwritten form.
Answer the following statement true (T) or false (F)