I want to parse a string and do some checks on the last character of the string. For example:
char *name = "angela";
int i;
for(i = 0; i <= strlen(name); i++) {
if(name[i] == 'a' && i == strlen(name)) {
*do something here*;
}
}
I tried this but nothing happens. Why won't this work?