I am wondering why the expected output for the below program is not "hai"
#include<stdio.h>
#include<conio.h>
void first(char*);
void first(char *s)
{
printf("%u",s);
s="hai";
}
int main()
{
clrscr();
char *t ="welcome";
printf("%u",t);
first(t);
printf("%s",t);
getch();
return 0;
}
The output am getting is Welcome instead of Hai.
It would be more helpful, if somebody can explain in detail ?