I found a nice example of how to use strcmp, but it\'s only working with fgets(), and i need to make it work with scanf. So, here\'s the code:
int main(void) { c
scanf() does not write the trailing newline character(s) into ans. strcmp() does consider newline characters in its comparison, so it's not matching your literal, which includes the newline.
scanf()
ans
strcmp()