null terminated character

http://stackoverflow.com/questions/270708/string-array-with-garbage-character-at-end

u have to end the string with a character. That’s why they are called zero terminated strings.

It is also wise to allocate 1 extra char to hold the ”. (0 without single quotes also works )

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s