get sentence

Hello every one =)

can any one there help me .... please
and explan how can i use get sentence ???

like :
#include <stdio.h>
void main(){
char x[80];
void reverse(char*);
gets(x);
reverse (x);
}
void reverse(char *s){
if(s[0] == '\0')
return;
else{
reverse (&s[1]);
putchar(s[0]);
}
}




...............................
or this :
int getchar();


please ... i need a help =)
closed account (Dy7SLyTq)
well what getchar does is take a value from the keyboard and print it. gets allows you type until you hit enter
i have already run your program, and it is ok. I think you have forgotten to press 'enter' after your input sentence as DTCode says.
thank all =) =)
Topic archived. No new replies allowed.