//Source code :
#include <stdio.h>
#include <string.h>
#include <conio.h>
void main(){
char name[20];
int i,j,k;
clrscr();
printf("\nEnter a string : ");
scanf("%s",name);
for(i=0;i<strlen(name);i++){
printf("\n");
for(j=i+1;j<strlen(name);j++)
printf("%c",name[j]);
for(k=0;k<=i;k++)
printf("%c",name[k]);
}
getch();
}
OUTPUT:- Description:
- input a string
- print the string elements from (i+1)th index to end of the string
- print elements from 0 to i.
No comments:
Post a Comment
leave a comment here