read a document from console in c

#include <stdio.h>

#define MAX_LENGTH 1000

int main() {
    char document[MAX_LENGTH];

    printf("Enter the document:\n");
    fgets(document, MAX_LENGTH, stdin);

    printf("\nDocument read from console:\n%s", document);

    return 0;
}