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".

Computer Science & Information Technology

You might also like to view...

What is the path of a notebook?

A) The name of the notebook and its location B) The notebook and the storage device C) The notebook and the subject text box D) The name of the notebook and the application

Computer Science & Information Technology

Which NIST publication describes the philosophical guidelines that the security team should integrate into the entire InfoSec process, beginning with "Security supports the mission of the organization"?

A. SP 800-12, Rev. 1: An Introduction to Information Security (2017) B. SP 800-18, Rev. 1: Guide for Developing Security Plans for Federal Information Systems (2006) C. SP 800-14: Generally Accepted Principles and Practices for Securing Information Technology Systems (1996) D. SP 800-55, Rev. 1: Performance Measurement Guide for Information Security (2008)

Computer Science & Information Technology