Compiler: Visual C++ Express Edition 2005 Compiled on Platform: Windows 2003 Server Standard Edition Header file: Standard Additional library: none/default Additional project setting: Set project to be compiled as C Project -> your_project_name Properties -> Configuration Properties -> C/C++ -> Advanced -> Compiled As: Compiled as C Code (/TC) Other info: To do: Finding the last occurence of a character To show: Using strchr() // Using strchr() // Don't forget to add the .h to the following header file(s) #include #include int main() { char *string1 = "A zoo has many animals including birds"; int c = 'm'; printf(" Using strchr()\n"); printf(" ---------------\n"); printf("string1 = %s\n", string1); printf("\nThe remainder of string1 beginning with the\n"); printf("last occurrence of character \'%c\'", c); printf("\nis: %s\n", strchr(string1, c)); return 0; } Output: Using strchr() --------------- string1 = A zoo has many animals including birds The remainder of string1 beginning with the last occurrence of character 'm' is: many animals including birds Press any key to continue . . .