title: C Struct Operators
body: <p>In Deitel's book about C structures, there is a question like this: </p>
  
  <pre><code>struct customer {
     char lastName[ 15 ];
     char firstName[ 15 ];
     int customerNumber;
         struct {
             char phoneNumber[ 11 ];
             char address[ 50 ];
             char city[ 15 ];
             char state[ 3 ];
             char zipCode[ 6 ];
             } personal;
  
   } 
      customerRecord, *customerPtr;
      customerPtr = &amp;customerRecord;
  </code></pre>
  
  <p>and the question is: </p>
  
  <p>Member phoneNumber of member personal of the structure pointed to by customerPtr.?</p>
  
  <p>Answer in solution Manual: </p>
  
  <pre><code> customerRecord-&gt;personal.phoneNumber
  </code></pre>
  
  <p>Is the solution right? customerRecord is not a pointer but answer used arrow. I thought the answer must be this: </p>
  
  <pre><code> customerPtr-&gt;personal.phoneNumber
  </code></pre>
  
  <p>What confuses me is this is a basic thing and maybe I did not get it right yet.</p>
  
  <p>Thanks</p>