title: How to execute a part of code inside a function only once using #ifndef?
body: <pre><code>//static int initialized;
  void print(struct student *arg) {
    #ifndef first_call
    #define first_call 1
    //if (!initialized) {
      //initialized = 1;
      printf("sizeof(*arg1): %lu\n", sizeof(*arg));
    //}
    #endif
    ...
  }
  </code></pre>
  
  <p>I want to execute lines of code within if block only once.</p>
  
  <p>Of course I know how to do that through different way(commented part).</p>
  
  <p>But I want to know why my code doesn't work as I intended.</p>
  
  <p>Thanks.</p>