Answer the following statements true (T) or false (F)
1. The following function call stores in target the null-terminated string "Eliza".
strncpy(target, "Elizabeth", 5);
2. The following code fragment stores "compute" in variable str, and then changes the 'u' to an 'e' so str's value is "compete".
strcpy(str, "compute");
str[4] = 'e';
3. The condition
str1 < str2
is true if the string value of str1 alphabetically precedes the string value of str2.
4. The string library function strcmp compares the lengths of two strings.
5. In the code fragment below, the value assigned to the type double variable x is -2.5.
sscanf("5 -0.5 end", "%d%lf%s", &n, &d, str);
x = n * d;
1. False
2. True
3. False
4. False
5. True
You might also like to view...
If you change text to bold and red, you have changed the ________
A) format B) design C) layout D) mode
The lock screen in Windows 10displays _____.
A. ?the used and the remaining disk space B. ?a picture along with the current date andtime C. ?all the available windows themes for a PC D. ?all the installed applications on a PC