Can we determine if a program is well working by considering the following questions?

1. Memory is succesfully reclaimed by the Operating system
2. There is no Stack Overflow

after writing and running some code to determine whether there is any overflowing going on?

Our assistant give us feedback after running our program through some other program.

In the feedback, it shows whether if there was an overflow , whether we were using using free / delete in wrong way, and some other things.

I wonder How did she found out ?