Skip to content

Beta · Data may be lost.Your data may be reset or lost.

GateBrew
← GATE CSE 2015 Set 3
Questions

Q7

MCQ1 mark, −0.33ProgrammingMedium

Consider the following C program segment.

# include <stdio.h>
int main()
{
    char s1[7] = "1234", *p;
    p = s1 + 2;
    *p = '0';
    printf("%s", s1);
}

What will be printed by the program?

Sign in to save attempts.

The solution is hidden while you attempt this question. It opens once you check or show the answer.