Get Email Subscription

Enter your email address:

Delivered by FeedBurner

Monday, December 28, 2009

Symbolic Constants in 'C'

Symbolic Constants in C

In ‘C’ programming there are some constant which are important in the programme. These constant can be made more clear by given them some proper name such constant are called as symbolic constant and they appear in #define statements.

#define is called a preprocessor directive in ‘C’

For eg:-


#define RADIUS 10


#define MARKS 100


#define TOTAL 500


#define COLLEGE Google School


#define HEIGHT 3.7


Rules to define symbolic Constants:-

  1. The preprocessor directive #define must appear before the symbolic constants.
  2. No space is allowed between # and define
  3. After the word #define a gap is necessary before the symbolic constant.
  4. After writing the constant a gap is necessary before the assigned value.
  5. These constants are written in upper case form.
  6. #define statement should not end with a semicolon.

Related Posts by Categories



0 comments:

About This Blog

Lorem Ipsum

  © Blogger templates Newspaper III by Ourblogtemplates.com 2008

Back to TOP