That's not how you do it. It helps, but it's far from comprehensive, hence not "zero-defect".
The one thing that may possibly create zero-defect software is formal proof, but that is far from being practical.
The one thing that may possibly create zero-defect software is formal proof, but that is far from being practical.
Btw. one of the first steps to zero-defect software is an appropriate programming language. I wouldn't choose C oder C++ but Ada or SPARK or so.