ProgrammingHard
char s[] = "abc"; char t[sizeof s]; strcpy(t, s); t[0] = 'X'; printf("%s%s", s, t); What is printed?
- A. XbcXbc
- B. abcXbc
- C. abcabc
- D. XbcAbc
Correct answer: B. abcXbc
t is a separate array, so changing t[0] does not affect s. The two strings are printed one after the other.