|
|
Inappropriate
|
See Answer
To Email:
Subject:
Note to go along with the question: (Optional, no
more than 1,000 characters)
The PHP Hypertext Preprocessor is a programming language that allows web developers to create dynamic content that interacts with databases. PHP is basically used for developing web based software applications.
Create Date
:
Saturday, May 10, 2008
Click here
to improve the Interview Question, Answer and other fields.
|
|
Inappropriate
|
See Answer
To Email:
Subject:
Note to go along with the question: (Optional, no
more than 1,000 characters)
#define cat(x,y) x##y concatenates x to y. But cat(cat(1,2),3) does not expand but gives preprocessor warning. Why?
in this case the cat(x,y) is the macro which is defined by using the preprocessor directive , this will be substituted only at the place where it is called in this example it happens like this
cat(1,2)##3 which will once again become 1##2##3
here if we use ## in between we can join or concatenat only two variables that why it gives a preprocessor warning
Create Date
:
Sunday, March 16, 2008
Click here
to improve the Interview Question, Answer and other fields.
|
|
Inappropriate
|
See Answer
To Email:
Subject:
Note to go along with the question: (Optional, no
more than 1,000 characters)
A macro is a preprocessor directive that provides a mechanism for token replacement in your source code. Macros are created by using the #define statement. Here is an example of a macro: Macros can also utilize special operators such as the stringizing operator (#) and the concatenation operator (##).The stringizing operator can be used to convert macro parameters to quoted strings, as in the following example: #define DEBUG_VALUE(v) printf(#v " is equal to %d.n", v)
In this program, we can check the value of a variable by invoking the DEBUG_VALUE macro: int x = 20; DEBUG_VALUE(x); The preceding code prints "x is equal to 20." on-screen. This example shows that the stringizing operator used with macros can be a very handy debugging tool.
Create Date
:
Saturday, March 15, 2008
Click here
to improve the Interview Question, Answer and other fields.
|
|
Inappropriate
|
See Answer
To Email:
Subject:
Note to go along with the question: (Optional, no
more than 1,000 characters)
#error is the preprocessor directive which produces compile time error messages. These directives are most useful for detecting programmer inconsistencies and violation of constraints during preprocessing.
Create Date
:
Wednesday, November 07, 2007
Click here
to improve the Interview Question, Answer and other fields.
|
|
Inappropriate
|
See Answer
To Email:
Subject:
Note to go along with the question: (Optional, no
more than 1,000 characters)
The technique to avoid multiple inclusions of the same header is to use the #ifndef and #define
preprocessor directives
Create Date
:
Tuesday, September 11, 2007
Click here
to improve the Interview Question, Answer and other fields.
|
|
Inappropriate
|
See Answer
To Email:
Subject:
Note to go along with the question: (Optional, no
more than 1,000 characters)
To override you can use the #undef preprocessor directive to undefine (override) a previously defined macro.
Create Date
:
Tuesday, September 11, 2007
Click here
to improve the Interview Question, Answer and other fields.