c string last character not printing code example
Example 1: get last char string c
char fruit[5] = "apple";
printf("Last character : %c", fruit[strlen(fruit)-1]);
Example 2: how to check where the last char is in a string c
strlen(str);
char fruit[5] = "apple";
printf("Last character : %c", fruit[strlen(fruit)-1]);
strlen(str);