Be sure you understand why you get each result. Then apply what you have learned to fill in the body of the function below code example
Example 1: How do I show the changes which have been staged
git diff --staged # or you can use --cached (they are synoyms, see the source)
Example 2: how to check if you are at the end of an file
while(!feof(stdin))