I am beginner with C .
somebody help me whith this question.
when i run this there is a runtime error.
#include%26lt;stdio.h%26gt;
void main(void)
{
char *p="ABCDE";
p[2]='z';
printf("%s\n",p);
}
Please help with this problem!!?
// Declare your storage like this instead
// While the pointer you declared is a variable,
// the constant string that you pointed it to can not be written to.
//
#include%26lt;stdio.h%26gt;
void main(void)
{
char p[]="ABCDE";
p[2]='z';
printf("%s\n",p);
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment