Question: In program C 2) Trace and write the output of the following code. If the statement contains an error describe the error and how to
2) Trace and write the output of the following code. If the statement contains an error describe the error and how to correct it. . char s150]"jack"s2 [501] i1l,S3 [50],sptr 2. printf (%cts", toupper (s1 [O] ) , &s1 [ 1] ) 3, printf("%s", strcpy (s3, s2)); 4. printf("%s"), strcat (strcpy (s3, s1), " and w),S2); 5. printf("%u", strlen (s1) + strlen (s2)); 6. printf("%u", strlen(s3)); 7. char s[101 8.strncpy (s, "hello", 5) 9. printf("%s ", s); 10.printt(%s", 'a, ) ; 11.char s[121 12.strcpy (s,"Welcome string2") 13.if stremp (string1, string2)) 14 printf (The strings are equal ")
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
