What is the output of this C code?
#include <stdio.h>
main()
{
char *p = "Sanfoundry C-Test";
p[0] = 'a';
p[1] = 'b';
printf("%s", p);
}
Answers
Answered by
3
Code
Input
#include <stdio.h>
main()
{
char *p = "Sanfoundry C-Test";
p[0] = 'a';
p[1] = 'b';
printf("%s", p);
}
Output
$ cc pgm.c
$ a.out
Segmentation fault (core dumped)
Answered by
14
heya..
here is you answer...
What is the output of this C code?
$ cc pgm.c
$ a.out
It may help you...☺☺
Similar questions