title: How do I read values into a structure using pointers?
body: <p>I know when I have to print I use <code>p-&gt;real</code> and so on but what should I write when I am reading numbers using <code>scanf</code>?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  typedef struct {
      int real;
      int imaginary;
  } complex;
  
  void read(complex*);
  
  void main() {
      complex c;
      read(&amp;c);
  }    
  
  void read(complex* p){
      /*what to write in scanf*/
  }
  </code></pre>