Multiple choice technology programming languages

5.What is the output? main() { char s1[]=“TCS”; char s2[]= “systems”; printf(“%s”,s1); }

  1. 0

  2. null

  3. systems

  4. TCS

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The code initializes s1 with 'TCS' and s2 with 'systems', but only prints s1 using printf. The printf function displays the string stored in s1, which is 'TCS'. Option s2 is never used in the output, so it doesn't affect the result.