CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

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

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Road Accidents
GEOGRAPHY
Watch in App
Join BYJU'S Learning Program
CrossIcon