#include "stdio.h"
#include "conio.h"
#include "ctype.h"
#include "stdlib.h"
#include "string.h"
#define SIZE 10
int main()
{
char str[SIZE];
char *ptr;
printf("\n\n\n\tExp : hello world >> ellohay orldway");
printf("\n\t------------------------------------");
printf("\n\n\n\tEnter The Sentences : ");
gets(str);
ptr=strtok(str," ");
printf("\n\tPrint The Sentences : ");
while(ptr!=NULL)
{
char temp=ptr[0];
strcpy(ptr,ptr+1);
ptr[strlen(ptr)]=temp;
printf("%say ",ptr);
ptr=strtok(NULL," ");
}
printf("\n\n\n\t");
system("pause");
}