hello everyone ,
this one might seem wired but i dont know why iam confused with this
simple stuff
the problem is :
char name[10];
this defines a array of char with size 10 where 0-8 positions(count 9)
can be characters and name[9] should be '\0' .right?
but when i strcpy() a string of 10 characters (strlen()=10) into
name ,it works fine
and shows name[9]=a valid character from the string .
so where did the '\0' character of name[9] gone?????
and why is it not complaining???
thank you
mohan gupta
this one might seem wired but i dont know why iam confused with this
simple stuff
the problem is :
char name[10];
this defines a array of char with size 10 where 0-8 positions(count 9)
can be characters and name[9] should be '\0' .right?
but when i strcpy() a string of 10 characters (strlen()=10) into
name ,it works fine
and shows name[9]=a valid character from the string .
so where did the '\0' character of name[9] gone?????
and why is it not complaining???
thank you
mohan gupta
Comment