Page 20 - 6437
P. 20

You can break a long line into multiple lines using string literals and separating them
                   using whitespaces.
                          Here are some examples of string literals. All the three forms are identical strings.



                 "hello, dear"


                 "hello, \


                 dear"


                 "hello, " "d" "ear"

                          Defining Constants
                          There are two simple ways in C to define constants:
                                       Using #define preprocessor
                                       Using const keyword

                          The #define Preprocessor
                          Given below is the form to use #define preprocessor to define a constant:


                 #define identifier value

                          The following example explains it in detail:

                 #include <stdio.h>


                 #define LENGTH 10

                 #define WIDTH  5
                 #define NEWLINE '\n'


                 int main()

                 {


                    int area;


                    area = LENGTH * WIDTH;









                                                                                                      22
   15   16   17   18   19   20   21   22   23   24   25