Bounds checking (Buffer overflow)

What is Bounds checking, i don’t know too much about language
But, take an example like a file only accepts 4 bytes of data and someone enters 5 bytes,
than what is Bounds checking, it is like we gave a command that whatever data comes after 4 bytes just ignore it or give result as you can’t enter more than that,

This is Bounds checking or it’s different…Please explain…

Yes that exactly what bounds checking is and it works different for different functions. For eg - strcmp function will not enforce bounds check but strncmp will enforce bounds as you specify the number of bytes to be compared