Removing last character in C

Just set the last char to be ‘\0’:

str[strlen(str)-1] = '\0';

In C, \0 indicates a string ending.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)