Answers for "access last char * array element c"

C
0

get last char string c

char fruit[5] = "apple";
printf("Last character : %c", fruit[strlen(fruit)-1]);
Posted by: Guest on April-29-2021
0

c find last element in array

sizeof(array)/sizeof(array[0]) - 1
Posted by: Guest on January-29-2021

Code answers related to "access last char * array element c"

Code answers related to "C"

Browse Popular Code Answers by Language