'\0' is a spacebar in C
After i input a string, e.g abc de
How cam i know the end of an array ??
thx...
Printable View
'\0' is a spacebar in C
After i input a string, e.g abc de
How cam i know the end of an array ??
thx...
> '\0' is a spacebar in C
No it isn't. It is NULL, or a zero value, used commonly to denote the end of a string.
> After i input a string, e.g abc de
Use fgets or scanf with the appropriate arguments.
> How cam i know the end of an array ??
I'll assume that you mean "end" as in: the first unused cell in an array.
You can use strlen to find the length, or you can just loop through the array looking for NULL.
Quzah.
hello dking,
u can use the 'sizeof()' operator to know the length or size of your array variable.
i'm using Turbo C and its compiler.
thanx...
take care...
_________