Consider the following C program segment.
# include <stido.h>
int main ( ) {
char s1 [7] = "1234", *p;
p = s1 +2;
*p = '0';
printf ("%s", s1);
}
What will be printed by the program?
A
1204
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
B
12
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
1034
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
120400
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution
The correct option is A 1204 Therefore the output is 1204