When writing the line of input to the string, the final newline character is converted to a null character so the string is null terminated. If the input is not successful, it returns NULL . Basically, it just means that the function is not allowed to change the value of the pointer. This program reads one line at a time from standard input and writes the line back to standard output. If we redirect standard input to come from a file, the file will be displayed to standard output, which we could also redirect to a file if we want.
C comes with two standard libraries that make working with strings simpler.
This function takes two strings and copies the second to the first. It also returns the value of the first pointer, but often this value does not get used in the program. This function takes two strings and compares them. If they are equal, it returns a 0. If the first string is greater than the second string, it returns some number greater than 0.