Machine-translated by Google. Questions are authored in English.
Top

Discussion

What is #include directive?

  • A.Tells the preprocessor to grab the text of a file and place it directly into the current file
  • B.Statements are not typically placed at the top of a program
  • C.All of the mentioned
  • D.None of the mentioned

Answer: A

Correct answer: Tells the preprocessor to grab the text of a file and place it directly into the current file

#include performs a textual insertion: the named file’s contents replace the directive, and the result is then processed as if it had been typed there. This is why a header can define macros and types that the including file goes on to use, and why include guards are needed to stop the same text arriving twice.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.