What is the output? char str[] = "ABC";
What is the output?
char str[] = "ABC";
str[1] = 'X';
printf("%s", str);
Show answerHide answer
Correct answer: (C) AXC
Explanation
A char array can be modified; index 1 becomes X.
Correct answer: (C) AXC
Explanation
A char array can be modified; index 1 becomes X.
This is question 130 of DSSSB TGT Computer Science Full Mock Test 4. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.