Preprocessor Directives Assignment Help

C++ Programming - Preprocessor Directives

Preprocessor directives

Preprocessor directives start with the # token abided by a preprocessor keyword. The # token bear to look like the first character which is not white space on a line. The # is not constituent of the directive name and could be separated from the name with white spaces.

A preprocessor directive closes at the new line character except when the last character of the line is the \ (backslash) character. If the \ character look like the last character in the preprocessor line, the preprocessor reads the \ and the new-line character as a sequel marker. The preprocessor erases the \ and the accompanying new-line character and ties the physical source lines into uninterrupted ordered lines. White space is permitted among backslash and the end of line character or the physical end of record. All the similar, this white space is by and large not see able during editing.

Preprocessor directives comprise of the accompanying:

ñ  Macro definition directives, which substitute tokens in the current file with assigned replacement tokens

ñ  File comprehension directives, which embed files within the current file

ñ  Conditional compiling directives, which conditionally compile sections of the current file

ñ  Message generation directives, which control the generation of diagnostic messages

ñ  IBM extension Assertion directives, which determine properties of the system the program is to execute on

ñ  The null directive (#), which executes no action

ñ  Pragma directives, which apply compiler-particular conventions to assigned sections of code

The C preprocessor (cpp) is the preprocessor for the C++ computer computer programming languages. The preprocessor manages directives for source file comprehension (#comprise), macro definitions (#determine), and conditional comprehension (#if).

In various C executions, it is a discriminate program raised by the compiler as the first constituent of translation. The programming language  of preprocessor directives is agnostic to the grammar of C, thus the C preprocessor could likewise be employed

The first four  phases of translation assigned in the C Standard are:

ñ  Trigraph replacement:
 The preprocessor substitutes trigraph sequences with the characters they comprise.

ñ  Line splicing:
Physical source lines which are proceeded with got away newline sequences are tied to form ordered lines.

ñ  Tokenization:
The preprocessor breaks the consequence into preprocessing whitespace and tokens. It substitutes comments with whitespace.

ñ  Directive dealing and macro expansion:
Preprocessing directive lines, comprises file comprehension and conditional compiling, are executed. The preprocessor at the similar time elaborates macros and, in the 1999 version of the C measure, manages _Pragma operators.

ñ   

Students can get solutions for Preprocessor directives in C++ computer programming online. ExpertsMinds interactive academic session will make learning Preprocessor directives  in C++ computer programming easy. Get answers online to all the questions, assignments, homework on Preprocessor directives  in C++ computer programming, under the expert guidance of the tutors. Expertsmind.com offers  Preprocessor directives  in C++ computer programming online tutoring service, Preprocessor directives  in C++ computer programming homework help and Preprocessor directives  in C++ computer programming anytime from anywhere 24x7.