You don't need command-line argumnents. Delete lines 24-33 because you don't have a file to open. On line 24 substitute stdin for fp. stdin is always an open file that represents keyboard input and can also be used for redirected files.
reverse(stdin);