Preprocessors Flashcards

1
Q

The C Preprocessor is not a part of the compiler, but is a separate step in the compilation process

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

All preprocessor commands begin with what symbol?

A

#

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

A preprocessor command must be the first nonblank character.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

define

A

Used for constants to increase readability

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

include

A

Includes a particular header from another file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

undef

A

Undefines a preprocessor macro

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

ifdef

A

Returns true if this macro is defined

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

ifndef

A

Returns true if this macro is not defined

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

if

A

Tests if a compile time condition is true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

else

A

The alternative for #if

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

elif

A

else and #if in one statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

endif

A

Ends processor conditional

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

error

A

Prints error message on stderr

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

pragma

A

Issues special commands to the compiler

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

__DATE__

A

The current date as a character literal in “MMM DD YYYY” format

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

__TIME__

A

The current time as a character literal in “HH:MM:SS” Format

17
Q

__FILE__

A

This contains the current file name as a string literal

18
Q

__LINE__

A

The contains the current line number as a decimal constant

19
Q

__STDC__

A

Defined as 1 when the compiler compiles with the ANSI standard

20
Q

\

A

The macro is normally confined to a single line, however when multiple lines are required use this operator

21
Q

#

A

Converts a macro parameter into a string constant

22
Q

##

A

It permits two separate tokens in the macro definition to be joined by a