hello Structure element (string )is unable to assign if it is not assign during object creation as below code why ?my code is below please help me to understand
struct st
{
int i;
char ch[10];
char *ch1;
};
int main()
{
struct st var2={"hello"};//this good
struct st var;
var.ch="hello" ; //this bad why?
//then
var.i=9;//is good why?
var.ch1="hello"; //good why?
}