//Reverse order of words
#include "string.h"
void string_manip(char * str)
{
printf("Input -- > %s\n",str);
printf("Output-- >");
int l = strlen(str);
int j = 0;
int i = l-1;
for(i; i >= 0 ; i--)
{
if(str[i] == ' ' || (i == 0))
{
j = (i == 0 ? i:i+1);
while(str[j] != ' ' && str[j] != '\0')
{
printf("%c",str[j++]);
}
printf(" ");
}
}
}
void main()
{
string_manip("This is Big");
printf("\n");
string_manip("This function is called by the UI Framework");
}