So code compiles fine, but it doesn't print anything, what am i doing wrong. I haven't delved into strings yet.
Thank youCode:/* backWORDS.c prints a user inputed string backwards */ #include <stdio.h> #include <string.h> #include <stdlib.h> int main(void) { int count; char word[BUFSIZ]; /* caputure word */ printf("Enter a word\n"); gets(word); /* print word backwards */ for (count = '\0' /*strlen(word) -1*/ ; count >= word[0]; count--){ printf("%c", word[count]); } getchar(); return (0); }