title: Preferred order of declarations and #defines in a header file
body: <p>I am programing in C language in Linux platform . I want to know should be the order of declarations and <code>#defines</code> in a header file. </p>
  
  <p>For example if my header file includes following thing can anyone please suggest me what should the perfect order to arrange all these declarations, function like macros , exteren declarations, etc.</p>
  
  <p>This can be really beneficial for arranging all these things in a header file properly in terms of readability and coding standards. </p>
  
  <p>Below is the sample header file (I want to arrange the following in a proper order)  :</p>
  
  <pre><code> #include &lt;pthread.h&gt;                   //  Including Header files 
   #include &lt;signal.h&gt;
  
   #define IMAGE_DIRECTORY                 "Abcdefgh..."   //  Providing #defines 
   #define FAILED_TO_RECOGNIZE             "Xykbkksk..."
   #define PROGRESS_FRAME_COLOR            "#8e8ea1"
   #define FRAME_BG_COLOR                  "#7c90ac"      
  
   #define PRINT_FUNCTION_NAME fprintf(stderr, 
                     "CTRL IN FUNCTION : %s\n",__func__);   // Macro like functions 
  typedef struct {                                           
          int userId;                                      // Structure
           char name[32], rollNo[32];
           char class[16], section[16];
           unsigned long Id;
   }data_type;
  
  int noOfUsersList=0, usersListCount=0;                   // Global variables 
  </code></pre>