Generally, we do not handle string as we do with array of number (for example, assign value to an element one by one). • To handle string, we rather use some build in functions in the library string.h. For example, let “s1” and “s2” be two string variables. Then, we use 1. gets(s1) to input the string s1 2. printf(“%s
”,s2) to print s2 3. strlen(s1) to measure length of s1 (strlen return an integer) 4. strcmp(s1, s2) to compare s1 and s2 (strcmp return 0 if s1 and s2 are the same 5. strcpy(s1, “Hello”) to assign “Hello” to string s1 • Let take a look at the following examples