Hi all,
please see the below code.
int main()
{
char *a;
a= malloc(20);
strcpy("a,"Indi a"");
change(a);
printf("%s\n",a );
}
void change (char *b)
{
b="Testing";
}
The o/p of this program is India. can any one tell how this works.
}
please see the below code.
int main()
{
char *a;
a= malloc(20);
strcpy("a,"Indi a"");
change(a);
printf("%s\n",a );
}
void change (char *b)
{
b="Testing";
}
The o/p of this program is India. can any one tell how this works.
}
Comment