#define in C Language

O LEVEL -PAPER 3rD -- M3-R4

C  LANGUAGE 

define in C


The #define directive define directive defines an identifier and a character sequence ( a set of characters ) that will be substituted for the identifier each time it is encountered in the source file.

Syntax


The identifier is referred to as a macro name and the replacement process as macro replacement.

#define macro-name cha-sequence

Example -


#define PI 3.14

#define msg "hello"

We can write both number as well as character or string with help of #define.


define in c,c define
#define example



Comments

Popular posts from this blog

Notepad, Wordpad and Paint

O LEVEL- INTERNET TECHNOLOGY & WEB DESIGN

O LEVEL- INTERNET TECHNOLOGY & WEB DESIGN