What's wrong with my program?
Ok, I'm not completely sure what I'm doing wrong as I'm semi-new to programming. Any help would be much appreciated. Is it something with the strrev? not sure if I'm allowed to use it.
Code:
#include <stdio.h>
#include <string.h>
#include <conio.h>
int
main(void)
{
char words[50][20];
char *reversed;
int i = 0;
printf("=> ");
scanf("%s", &words[i]);
for(i = 0; i < 50; i++);
{
printf("%s ", words[i]);
if(words[i][0]==';')
break;
}
reversed = strrev(words[i]);
printf("%s ", reversed);
getch();
return (0);
}