c last char of string code example
Example 1: get last char string c
char fruit[5] = "apple";
printf("Last character : %c", fruit[strlen(fruit)-1]);
Example 2: what is the last character of a string in c
The last character of string in C is '\0'