- change case (one letter at a time)
int toupper(int ch); int tolower(int ch);
Example:
char s[] = "hello"; s[0] = toupper(s[0]); cout << s << endl; Output: Hello
- setting all char array members to the same char
char s[100000]; memset(s, 'X', 100000);
This sets all elements to be 'X' and is much faster than writing a loop (maybe 15 to 20 times as fast for arrays this size.).