TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Jasen Betts
from: Pascal Schmidt
date: 2004-01-30 14:04:16
subject: Re: [C] Question about external variable initialization

* Reply to message originally in area ALLESMIR


Hi Jasen! :-)

 BS>>> H e l l o   W o r l d  \0   <- text + x
 BS>>> 0 1 2 3 4 5 6 7 8 9 10 11   <- x
 BS>>> strlen will return 11. So there will be space for \0.
 PS>> No, strlen will return 10.
 JB> no 11,
 JB>   5 letters in "hello"
 JB>   5 letters in "world"
 JB>   1 space
 JB>   makes 11 the length of the string.
Whoops, silly me, I didn't see that Bo had counted from zero. :)

Ciao
Pascal

--- Msged/LNX 6.1.1
* Origin: Priority override. Tears of Ra. (1:153/401.2)
SEEN-BY: 633/267 270
@PATH: 153/401 307 140/1 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.