compilation

How can I disable C Compiler?


I want to make an application for learning C programming

of course, I will have some questions that ask about the output from a source code in my quiz

so..

how can I disable compiler in order to a person who is taking quiz cannot compile the source code??


Solution

  • This is not a programming problem, it's a human engineering problem.

    If you can trust your students (hah!), tell them that using a compiler to verify their answers is forbidden, that they are expected to answer the test questions using only the knowledge they have acquired so far from their experience and sample programs.

    If you suspect the students are going to cheat, administer the test on a computer that does not have a complier installed, or sacrifice a few trees to administer the test without using a computer at all.

    Although you don't give us any information about the specific compiler you want to disable and the operating system that the computer(s) in question is running, I can still say with confidence that there is no foolproof way of disabling the compiler. Many programming students are already competent computer users, and could find a way to re-enable the compiler even if you managed to disable it. Alternatively, they could install a different compiler, or even find one for free online.