I need to answer this question testing this: 

> 
> Exercise 19-16: Fix the code in example so that the sample variable's value is saved before the while loop runs and is then restored afterward. Add a puts(sample) statement to the code after the while loop is done executing, to prove that the variable's original address is restored.
> 
> 
> 

```
**Example:**
     #include <stdio.h>

    int main()
    {
        char *sample = "From whence cometh my help?\n";

        while(putchar(*sample++))
            ;
        return(0);
    }

```

I want to check if my answer is correct, may be you can give an explanation, because I have no clear understanding about pointers and variables. 
And this is my answer:

```
     #include <stdio.h>

        int main()
        {
            char *sample = "From whence cometh my help?\n"; //This is my string
            char StringSample[31];
            int index = 0;

            while(sample[index] != '\0') //while the char is NOT equal to empty char (the last one)
            {
                index++; //increase the index by 1
                StringSample[index] = sample[index]; //put the char "n" inside the stringSample //
                putchar(*sample++);  //write it to the screen
            }
            putchar('\n'); //A new line

            //to put the entire string on screen again
            for (index=0; index<60; index++)
            {
                putchar(StringSample[index]); 
            }
            return(0);
        }

```

Here is my output:

[![enter image description here](https://i.stack.imgur.com/Fsz7g.jpg)](https://i.stack.imgur.com/Fsz7g.jpg)

I don't know why the string is split it to `From whence co` and why the rest of the text, that as you can see, has no sense.

I'm using Xcode 5.02