Hi
So I want to reverse text. If I use the EOF marker, it compiles but does not output.' /n' suffices, but my input could be greater than one line.
Code:#include <stdio.h> #define MAX 500 int main() { char c, phrase[MAX]; int i; printf("enter your phrase?\n"); for(i=0;(c = getchar()) !='\n'; ++i) phrase[i] = c; for (--i; i >=0; --i) putchar(phrase[i]); putchar('\n'); return 0; }