Currently, this program generates no errors. It should, for pedagogical reasons, err on the two assignments, even though it's not technically illegal in C.
#include<stdio.h>intmain(intargc, char*argv[])
{
char*p="hello";
inti;
i=p;
p=i;
printf("p=%s\n", p);
return0;
}
Currently, this program generates no errors. It should, for pedagogical reasons, err on the two assignments, even though it's not technically illegal in C.