{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

chtp5_13-TIF-Beta - 13.1Introduction 13.1 Preprocessing...

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
13.1  Introduction 13.1 Preprocessing occurs (a) before a program is compiled. (b) during compilation. (c) after compilation but before execution. (d) immediately before execution. ANS: (a) 13.2 Preprocessor directives (a) begin with include (b) are C statements. (c) are ignored if whitespace characters before them on the same line. (d) do not end in a semicolon. ANS: (d) 13.3. Which is not a capability of the preprocessor? a) inclusion of other files in the file being compiled b) definition of functions c) definition of symbolic constants d) definition of macros ANS: (b) 13.4. Which statement about the preprocessor is false? a) it can perform conditional compilation of program code b) it can perform conditional execution of preprocessor directives c) all preprocessor directives begin with # d) all preprocessor directors must begin in column 1 ANS: (d) 13.2  The #include Preprocessor Directive 13.5 The #include preprocessor directive causes a(n) ____________ to be included instead of the directive. (a) copy of a file (b) # character (c) pointer to a file (d) bitfield ANS: (a)
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
13.6 Which include statement is usually appropriate for user-defined files? (a) include <filename> (b) #include "filename" (c) Both (a) and (b) are appropriate. (d) Neither (a) nor (b) is appropriate. ANS: (b) 13.7. The #include directive a) must begin in column 1 b) includes a file in the program at execution time c) includes a file in the program before compilation d) appends a file to the end of the program ANS: (c) 13.8. Which is a correct form of the #include directive a) #include ‘filename’ b) #include /filename/ c) #include #filename d) #include <filename> ANS: (d) 13.9. Which statement about the #include directive is false? a) The difference between the various forms of the #include directive is the location the preprocessor searches for the file to be included. b) If the file name is enclosed in quotes, the preprocessor searches in the same directory as the file being compiled for the file to be included. c) If the file name is enclosed in angle brackets, the preprocessor searches in the same directory as the file being compiled for the file to be included. d) The preprocessor searches for standard library header files in an implementation- dependent manner. ANS: (c) 13.10. Which statement about the #include preprocessor directive is false? a) It used used with programs consisting of several source files that are to be compiled together. b) A header file containing definitions common to separate program files is often created and included in a program with #include . c) #include header files often contain structure and union definitions, enumerations and function prototypes. d) It includes standard library header files such as standardio.h . ANS: (d)
Image of page 2
13.3  The #define Preprocessor Directive: Symbolic Constants 13.11 const variables are preferred to symbolic constants (from #define ) because (a) const variables take up less memory.
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern