I have this code. All i need to do else is to reverse the order of words. I think, i have to get
lenght of the row. I tried to use strlen but I cant get it to work. Something is really messed up in my program and I dont know what. Please show me the problem, dont solve it, all I need is the right direction!
Code:#include <stdio.h> #include <string.h> int main() { int sranje; char niz[80],*ptrn; int i; ptrn = niz; puts("Unesite recenicu: "); for(i=0;i<80;i++) { scanf("%c", &niz[i]); printf("%c", *ptrn); if(*ptrn==' ') { br++; printf("\n"); } ptrn++; } scanf("%d", &sranje); }