char fruit[5] = "apple"; printf("Last character : %c", fruit[strlen(fruit)-1]);
The last character of string in C is ' '
strlen(str);