Social Sciences, asked by Mohit0000, 11 months ago

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 GhaintMunda45
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 Anonymous
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