Showing posts with label #define directive. Show all posts
Showing posts with label #define directive. Show all posts

Explain the Basic Structure of a C Program with an Example.

Basic structure of C programming: 

To write a C program, we first create functions and then put them together. A C program may contain one or more sections. They are illustrated below.

What is #define directive?

#define directive:
  1. A #define is a preprocessor compiler directive and not a statement.
  2. #define should not end with a semicolon.
  3. Symbolic constants are generally written in uppercase so that they can be easily distinguished from the lowercase variable names.
  4. #define instructions are usually placed at the beginning before the main() function.