CIS 1500 Chapter Notes - Chapter 5: C String Handling, Null Character
Document Summary
Case matters when comparing strings (apples =/= apples) When you compare strcmp compares ascii values in the letters. Can use < , > , == to compare the strings. Each string has a position number called an index. The notation stringname[0] has access particular location in an index. So that code knows where a string ends the compiler adds a null character at the end of a string. Strlen outputs the length of a string. Usertext[strlen(usertext) - 1] will return the last character in a string. #include provides accesses functions to use on characters isalpha: true if alphabetical isdigit: true if digit 0-9 isspace: true if whitespace toupper: makes character uppercase tolower: makes character lowercase. An array stores multiple variables under one name. Some languages use a similar thing called a vector. Each item in an array is called an element.