Obtenha o último char string c
char fruit[5] = "apple";
printf("Last character : %c", fruit[strlen(fruit)-1]);
Marton
char fruit[5] = "apple";
printf("Last character : %c", fruit[strlen(fruit)-1]);
strlen(str);