Summary for Chapter 1 to 4

Inspirational

Contributed By: Shehrevar Davierwala

    1. Structure of C program
      #include <stdio.h>
      /* Include files for input/output functions*/
      #define const_namevalue
      /* constant declaration if required */
      main() /* Main function */
      { /* each declarations and statements are separated by semi colon */
      declarations
      /* variables; arrays; records;
      function declarations etc */
      statements
      }
      function definitions
    2. Compiler Directives
    3. #include statements –used to include the header file for input/output stdio.h, the standard mathematics library math.h etc.

      –These files are enclosed within < >
      #define –helps in defining constant symbol.
        Example
        #include <stdio.h>
        #define i 6
        main()
        { /* integer declaration */
        intx, y;
        /* Assignment statements */
        x=7;
        y= i + x;
        /* output statement */
        printf(“%d\n”, y); }

About the author: admin

Leave a Reply

Your email address will not be published.