I just completed the vigenere problem set and I had this weird bug which, despite fixing it, don't understand why it was a bug. When I was implementing the caesar shift part, I added the plaintext char and the shift int value and stored them in a char called mod_c (modified char). however, for some reason this led to mod_c int value to be negative. When I changed it from type char to type int, everything worked perfectly.
Why did this happen?
char lower_caesar(char plain_char, int shift)
{
char mod_c = plain_char + shift;
....
}