The sign that your computer may have been infected with malicious code is:
Your computer locks up or stops responding.
This can be an indicator of malicious activity, as malware can consume system resources, leading to performance issues and unresponsiveness.