I am reading the book C Primer Plus, the 5th edition, in order and I'm at the end of chapter 6 where they have some review questions. I'm having trouble with this question:

Write a program that reads in a line of input and then prints the line in reverse order. You can store the input in an array of char; assume that the line is no longer than 255 characters. (Recall that you can use scanf() with the %c specifier to read a character at a time from input and that the newline character (\n) is generated when you press the Enter key.)
For the "line of input," I'm assuming it takes both letters and numbers.

Here is what I have so far:

Code:
#include <stdio.h>
#include <string.h>
int main(void)
{
char line;
int letters;
char display[letters];

printf("enter a line:\n");
scanf("%s", line);

letters = strlen(line);

while (letters > 0)
{
printf("%s", display[letters]);
--letters;
}

return 0;
}
When compiling, I got the warning: "first.c:10: warning: passing arg 1 of `strlen' makes pointer from integer without a cast" and when I try to run the program, I get the error: "Segmentation fault (core dumped)."

Obviously I did it wrong (I'm not following the directions in the parentheses of the question), but anyway, after I got this far, I am stuck on what I should do and I have no clue as to how to go about doing this. Any pointers in the right direction would be appreciated; thanks.