Answer:
A type of malicious code that appears to be a safe program but that actually has a hidden purpose is called a trojan.
Explanation:
In computer security, a Trojan horse, or Trojan, is a type of computer program that claims to be useful, but is in fact harmful. It is a type of malware that, unlike computer viruses, requires that the recipient somehow launch the program, often by the Trojan hiding inside another program. For example, the program can spy on the user, make payments in the user's name, send spam or attack other computers.
The term trojan comes from the history of the Trojan horse in Greek history. According to legend, the Greeks are said to have given a giant wooden horse as a gift to the Trojans, outside the walls. When the Trojans pulled the giant horse into their city, it turned out to be full of Greek soldiers who came out of the horse and conquered the city.