Directive | Description |
---|---|
#define | Substitutes a preprocessor macro. |
#include | Inserts a particular header from another file. |
#undef | Undefines a preprocessor macro. |
#ifdef | Returns true if this macro is defined. |
#ifndef | Returns true if this macro is not defined. |
#if | Tests if a compile time condition is true. |
#else | The alternative for #if. |
#elif | #else and #if in one statement. |
#endif | Ends preprocessor conditional. |
#error | Prints error message on stderr. |
#pragma | Issues special commands to the compiler, using a standardized method. |
#include <stdio.h> #define PI 3.14 int main() { int radius; float area; printf("Enter the radius="); scanf("%d",& radius); area = PI*radius*radius; printf("Area =%f",area); getch(); return 0; }
Enter the rasius 5 Area= 78.5