• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

C String

Question 21

Consider the following C program segment. 
 

C
# 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?
 

  • 12 

     

  • 120400
     

  • 1204 
     

  • 1034
     

There are 21 questions to complete.

Last Updated :
Take a part in the ongoing discussion