Quote:
I have tried using "char name[10];" thinking it might be the storage problem,
There is
also a storage problem. In
C
programming language,
char
data type represents a
single character. On the other hand,
strings (e.g. names) are (
0
terminated) array of
char
acters. See, for instance,
C Programming Strings[
^].