A program has been compiled and linked successfully.
(i) Program executed, but no output: this usually happens due to run time errors in the program like referencing an out-of-range array element or mismatch of data types.
(ii) It produces incorrect answers: Then there may be logical errors in the program like failure to consider a particular condition or incorrect translation of the algorithm into the program or incorrect order of evaluation of statements etc.
(iii) It does not stop running: This happens when we make use of correct syntax statement but incorrect logic like if(code=1) count++;
Instead of using comparison operator we are using assignment which is syntactically correct so count++ is always executed resulting in infinite loop. Similar mistakes may occur in other control statements, such as for and while loop that causes infinite loops and does not stop running.