Sunday, November 28, 2010

Write a program that will print out all the rations of a string typed into it by using function Ex: "space": space paces acesp cespa espac

#include
#include
char rotation_words(char ch[])
{
int i,j,k;
int len=strlen(ch);
for(i=0;i {
for(j=i;j {
printf("%c",ch[j]);
if(j>=len-1)
{
for(k=0;k printf("%c",ch[k]);
}
}
printf("\n");
}
}
main()
{
char ch[100];
printf("Enter the string:");
gets(ch);

rotation_words(ch);
}