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

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

Challenge your C++ knowledge with a comprehensive quiz based on 'Thinking in C++'. Explore a variety of multiple choice questions with hints and explanations to solidify your understanding. Get prepared!

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.


What does the .SUFFIXES directive do in a makefile?

  1. Defines a list of valid file extensions for the project

  2. Specifies files to exclude from compilation

  3. Tells make which file-name extensions have special rules

  4. Automatically generates documentation for the project

The correct answer is: Tells make which file-name extensions have special rules

The .SUFFIXES directive in a makefile is used to indicate to the make tool which file-name extensions have special rules for how they should be compiled or linked. This allows for better organization and control of the build process, as well as the ability to handle files with non-standard extensions. Option A is incorrect because defining file extensions is not the main purpose of this directive. Option B is incorrect because it is used for specifying files to include, not exclude. Option D is incorrect because the .SUFFIXES directive does not have anything to do with generating documentation.