title: Using a data structure to take a value given by the user to put into an array to later be printed out
body: <p>What I'm trying to do is make a program that asks the user a name and a phone number. I want to take that information and put it into a data structure so that I can later put the information in the structure in alphabetical order. Where I'm running in trouble is putting the string into the array in the data structure. Apologize for this being a basic level question, just learning about C.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  
  static char name, number;
  
  typedef struct phoneBook {
      char personName[10];
      char phoneNumber[10];
  } book;
  
  void processBook(book *);
  
  main()
  {
      book person = {0};
      book *ptrBook;
  
      ptrBook = &amp;person;
  
      processBook(ptrBook);
      printf("What is the name: ");
      scanf("%s",&amp;name);
      printf("What is the number: ");
      scanf("%s",&amp;number);
      printf("\nName: %s\n", ptrBook -&gt; personName);
      printf("Phone Number: %s\n", ptrBook -&gt; phoneNumber);
  }
  
  void processBook(book *e)
  {
      strcpy(e -&gt; personName, &amp;name);
      strcpy(e -&gt; phoneNumber, &amp;number);
  }
  </code></pre>