made string reverse and gets() example