No we can't tell if you are or you are not during an exam. But if you have some starches or something like that, we can just suspect it is. But, it is always better to say the truth because sometimes some stretches and tearing happen because of sex. If you said you never had sex and you have a tearing the doc might think it is very usual. During bi-manual exam it is always better to tell the truth.
Note to others here: the "hymen
isn't broken" theory is not always true because some women born with no hymen and some have broken ones due to masturbation
or high physical activities, which is normal. I have done 4 exams now and I have seen one without a hymen and she never ever had sex. (we are sure-these girls are university controlled subjects.)