#define : pre prosesor directive

 //Here in the program define is called defination and

// LIMIT is called macro template and 5 is called macro expansion

//The we use capital letter in macro template

// and we never use semi colomn in macro defination

#include <stdio.h>

#define LIMIT 5

#define PI 3.1472

#define DISPLAY printf("HELLO WORLD\n");

#define PASSWORD "18158920@abc"

int main()

{ int counter ;

for(counter =1;counter<=LIMIT; counter++)

    printf("%d\n", counter);

    printf("%f is the value of PI\n ", PI);

    DISPLAY

    printf("Password is %s\n" , PASSWORD);


    return 0;

}

Comments

Popular posts from this blog

Factors : using C

Cross shaped pattern

Factorial ! calculation