25% ooo Verizon D 10:21 PM bblearn missouri.edu Fill out the answer sheet with y
ID: 3831967 • Letter: 2
Question
25% ooo Verizon D 10:21 PM bblearn missouri.edu Fill out the answer sheet with your choices and turn the quiz in. DO NOT PUT YOUR ANSWERS ON THIS SHEET RECORD THEM ON THE ANSWER SHEET ONLY. 1) Which of the following statements is true about a String in C: a a string in C is an array of characters ending in the null character b) string constants in Care written in double quotation marks c) the value of a string is the address of its first character d) all of the above e) none of the above 2) If I define a character array as follows: char names "williams a) what value is in position names[ij? b) what value is in position names[8] c) what is the length of array names 3) Using the definitions below: char sl [501-"jack", s2 50 jill" a) what will this line of code print out printf("%c%s toupper(s10 01), &s10; 1]); a jack b) JACK c Jjack d) none of the above b) what will this line of code print out printf %c%s", a) JILL b) ij ljill d) none of the above 4) MATCHING -match the term on the right with the definition on the left-USE AN ANSWER ONLY ONCE. a C function that returns a true value if c is hexidecimal digitExplanation / Answer
1) Answer: D) All of the above
Explanation
Example: printf(“Message”);
Example: char arr[] = “this”;
printf(“%s”, arr);
The Output : this
2) char names[] = “williams”;
a) The value is in position names[1] is: i
b) The value is in position names[8] is: No output
Because last index position is 7.
c) The length of the array: 8
3) a) Answer: d) None of the above
Explanation: printf("%c %s", toupper(s1[0], &s1[1]));
toupper(s1[0]) will convert the s1[0] position data i.e., j to upper case i.e., J.
&s1[1] Will produce the address of the one index position of s1, but %s is there so it will convert it into string and then uppercase.
Suggestion: Use %u for unsigned integer for address
b) Answer: d) None of the above
Explanation: printf("%c %s", toupper(s2[1], &s2[0]));
toupper(s2[1]) will convert the s2[1] position data i.e., i to upper case i.e., I.
&s2[0] Will produce the address of the zero index position of s2, but %s is there so it will convert it into string and then uppercase.
Suggestion: use %u for unsigned integer for address
4) a) isalnum(int c)
b) isxdigit(int c) .
c) None of the above.
Answer: <ctype.h>
5) Answer: T
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.