In copy.c
, in case we're copying a 3x3 bmp image, this piece of code adds the calculated padding to the bmp
// then add it back (to demonstrate how)
for (int k = 0; k < padding; k++)
{
fputc(0x00, outptr);
}
I believe that we're adding a hexadecimal value (3 Bytes), but per the fputc()
man page
DESCRIPTION
fputc() writes the character c, cast to an unsigned char, to stream.
Now, the size of an unsigned char
is a byte. So how does fputc()
manage to put 3 Bytes?