Can a Muslim who has denied the truth of Christianity go to heaven?
Jesus says, “Every one who acknowledges me before men, I also will acknowledge before my Father who is in heaven; but whoever denies me before men, I also will deny before my Father who is in heaven” (Matt. 10: 32-33).
To deny Jesus (a grave matter) with full knowledge and deliberate consent is to incur the guilt of mortal sin (see Catechism of the Catholic Church 1857-1859). And to die with such guilt is to merit eternal separation from God in hell:
To die in mortal sin without repenting and accepting God's merciful love means remaining separated from him forever by our own free choice. This state of definitive self-exclusion from communion with God and the blessed is called "hell” (CCC 1033).
This doesn’t mean, however, that every person who verbally denies the truth of Christianity, such as a Muslim, is going to hell. We don’t know if a person truly has full knowledge of what he is denying. He may have in his mind some idea of Jesus and Christianity that we would reject as well.
Moreover, we can’t ever know if a person has full deliberate consent. There may be mitigating factors that lessen his culpability, and thus reduce his verbal denial of Christ to venial guilt.
Whether a person has full knowledge or deliberate consent is something that only God can know. The only aspect of sin that we can make a judgment on is the objective act itself and its gravity.
For more information on mortal and venial sin, see paragraphs1854-1864 in the Catechism of the Catholic Church.