title: Best way to check if pointer is initialized
body: <p>Is there a way to check if pointer was initialized? I have a struct that cointain array of pointers</p>
  
  <pre><code>typedef struct foo
  {
      int* ptr1;
      int* ptr2;
      int* ptr2;
      ...
      int* ptr100;
  }
  </code></pre>
  
  <p>and then my code is assigning adresses to those pointers (inside loop). But before adress is assigned i want to check if pointer is already containing adress. I know that i can initliazie every pointer with <code>NULL</code> and then check this with:</p>
  
  <pre><code>if(ptr1 == NULL)
      do something
  </code></pre>
  
  <p>But is there way to write something similiar but without initialization of <code>ptr</code>?</p>