Question: Which is the correct for C language coding Consider the following program segment: 1 char string[50), string2[50): 2 tnt 1. 3 charch: 4 $ scanf(%s.
Consider the following program segment: 1 char string[50), string2[50): 2 tnt 1. 3 charch: 4 $ scanf("%s". stringl, string): 6 71 - strlen(string). strlen(string): 8 Add up the lengths of both strings / 9 1ech - string1[0]; 11 A Store the first character of stringl / 12 13 stringl - string: 14 Take a copy of string and store it in string / 15 16 if (strcmp(stringi string) - ) 12 If stringi is identical to string2/ Assume that relevant include statements and int main(void) have been declared. Which of the following lines is not the correct usage as indicated by the comments? A. Line 7 B. Line 10 C. Line 13 D. Line 16 S 4 5 6 7 8 9 0 E R T Y D. F. G
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
