title: Can I pass a string into a function
body: <p>How can I pass a string from an array into a function?
  I want to pass a string such as <code>"Battleship"</code> into the function <code>print()</code> and have it print <code>"Where would you like to place the Battleship?"</code></p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  void print(char ship_names);
  
  int main (void)
  {
      int index = 0;
      char ships_name[5][21]= { "Aircraft Carrier (5)", "Battleship (4)", "Submarine (3)", 
                                "Cruiser (3)", "Destroyer (2)"};
  
      for(index = 0; index &lt; 5; index++)
          print(*ships_name[index]);
  
  return 0;
  }
  
  void print(char ship_names)
  {
      printf("Where would you like to place the %s?\n", ship_names);
  }
  </code></pre>