get last char string c
char fruit[5] = "apple";
printf("Last character : %c", fruit[strlen(fruit)-1]);
4
6
The last character of string in C is '\0'
Thank you!
6
0
3
2
strlen(str);
Thank you!
2
0
Are there any code examples left?
New code examples in category C
-
C 2022-03-27 22:30:45 Problem Statement Print the following output: \ Input Format IN Output Format \
-
-
-
-
-
-
-