Mastering C++: A Comprehensive Quiz Based on 'Thinking in C++'

Disable ads (and more) with a membership for a one time $2.99 payment

Test your C++ skills with our quiz based on Bruce Eckel's 'Thinking in C++'. Dive into object-oriented programming, advanced topics, and fundamentals. Perfect for learners and experts alike. Assess your knowledge and become a C++ master!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


How can make be instructed to use a specific makefile?

  1. By setting an environment variable

  2. Using the -f option

  3. Renaming the makefile to 'Makefile'

  4. Placing the makefile in the root directory

The correct answer is: Using the -f option

Option A is incorrect because setting an environment variable would not specifically instruct make to use a certain makefile, but rather it would set a default makefile that make would use if a makefile is not specified. Option C is incorrect because renaming the makefile to 'Makefile' would only work if the makefile was named something else to begin with. It would not allow for the use of a specific makefile. Option D is incorrect because placing the makefile in the root directory would only work if the makefile was specifically named 'Makefile'. Otherwise, it would not be recognized as the makefile to be used. The correct option, B, is the best choice because it directly allows for the instruction of using a specific makefile by specifying the file with the -f option. This option would work regardless of the name or location of the makefile.