Computer Sciences > Gate 2015 Set-3 > C Code
Consider the following C program segment.
What will be printed by the program?
#include<stdio.h>
int main( )
{
char s1[7] = "1234", *p;
p = s1 + 2;
*p = '0' ;
printf ("%s", s1);
}
int main( )
{
char s1[7] = "1234", *p;
p = s1 + 2;
*p = '0' ;
printf ("%s", s1);
}
What will be printed by the program?
Correct : C Code
Similar Questions
Consider the following function written in the C programming language.
void foo (char *a)
{
if (*a && *a != ` `)
{
...
Consider the following function written in the C programming language.
void foo (char *a)
{
if (*a && *a != ` `)
{
...
Consider the following function written in the C programming language.
void foo (char *a)
{
if (*a && *a != ` `)
{
...
Total Unique Visitors
Loading......