Ace Your C++ Skills 2026 – Rock the ‘Thinking in C++’ Challenge!

Question: 1 / 565

How do you change the compiler used by the makefile according to the example?

Change the CPP variable

When using a makefile, the CPP variable is responsible for specifying the compiler used for compiling code. By changing this variable, you can change the compiler used without having to rewrite the entire makefile or modify the source code. Options B and D are incorrect because they involve external actions that would not directly affect the makefile. Option C is incorrect because rewriting the compiler invocation commands would essentially be changing the makefile itself. Thus, the most efficient and effective way to change the compiler used by the makefile is to modify the CPP variable.

Get further explanation with Examzify DeepDiveBeta

Install the new compiler in the system path

Rewrite the compiler invocation commands

Directly modify the compiler source code

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy