title: C programming: How to Access a Single Character from variable Type char**
body: <p>I have a main here for testing that passes a simple sentence as a test. </p>
  
  <pre><code>    int main()
  {
     char *sentence = "Hello There."; /* test sentence */
     char *word;  /* pointer to a word */
  
    printf( "sentence = \"%s\"\n", sentence );  /* show the sentence */
  
    word = get_word( &amp;sentence );  /* this will allocate memory for a word */
  
    printf( "word = \"%s\"; sentence = \"%s\"\n", word, sentence );  /* 
    print out to see what's happening */
  
    free(word);  /* free the memory that was allocated in get_word */
  
    return 0;
  }
  </code></pre>
  
  <p>Here is my get_word function that requires a char** as a passing argument and must output a pointer.</p>
  
  <pre><code>char *get_word( char **string_ptr )
  {
      char *word;
      word = (char*)malloc(919 * sizeof(char)); /* Assign memory space for storying gathered characters */
      strcpy(word,"")  /***********This is the line I need help with****/ 
  
    return word;
  }
  </code></pre>
  
  <p>This is an assignment question for a school project so cant ask for too much, my main concern is i would like to figure out how i can pass the first character 'H' of the sentence within main, to the variable word within my get_word function. Since this function is part of an assignment, I cannot change the signature. </p>
  
  <p>There is more to the question, like sorting between uppercase and lowercase, but i figure if i understand this concept I should be able to do the rest.</p>
  
  <p>Thank you for the help.</p>