Reading strings - Warnings . This is because the input streams use spaces as separators between values being read. The cat sat. It takes two parameters, The string variable into which the characters are to be read, and The maximum number of characters to read. String Summary and Notes.
Strings are just arrays of character which use the null char as a sentinel.
Since file streams behave like the standard input and output streams, we can also read and write strings directly from and to external text files. Strings can be processed in functions like any other array but have the advantage that we do not have to send the length of the strings to the function. Since a valid string must include the null char as well as its printable characters, we always need to allow one extra element for the null char. Write a function which accepts a string as a parameter and prints the characters in the string onto the standard output stream in reverse order . Write a program to test your function.