Computer Sciences > Gate 2015 Set-3 > C Code
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?
A
12
B
120400
C
1204
D
1034

Correct : C Code

Similar Questions

Consider the following program in C language: #include &lt;stdio.h> main() { &nbsp; &nbsp; int i; &nbsp; &nbsp; int *pi = &i; &nbsp; &nbsp; scanf("%d",...
#16 MCQ
Consider the following two C code segments. Y and X are one and two dimensional arrays of size n and n × n respectively, where 2 ≤ n ≤ 10. Assume that in both c...
#25 MCQ
Consider the following function written in the C programming language. void foo (char *a) { &nbsp; &nbsp; if (*a && *a != ` `) &nbsp; &nbsp; { &nbsp;...
#49 MCQ

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......