Skip to content

Conversation

@AvaEN
Copy link

@AvaEN AvaEN commented Jul 5, 2016

No description provided.

Ava N.
July 5, 2016

1. Character arrays are arrays of characters. For example: char c='a';. Strings are arrays of characters. For example: char[10]="Hello World";. What this will do is assign char[0]='H', char[1]='e', char[2]='l', char[3]='l', char[4]='o', char[5]=' ', char[6]='W', char[7]='o', char[8]='r', char[9]='l', char[10]='d'. String assignment is only at declaration. Also, at the beginning of the program should use "#include <string.h>".
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, not exactly - a string is basically a character array, but with a NULL terminator as the last element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants