C program for rotation, C/C++ Programming

void main()

{

          char a[100];

          int i,j,k,l;

          clrscr();

          printf("ENTER THE STRING: ");

          gets(a);

          l=strlen(a);

          l=l-1;

          for(i=0;i<=l;i++)

          {

                   k=a[0];

                             for(j=0;j

                             {

                                      a[j]=a[j+1];

                             }

                   a[j]=k;

                   printf("\n%s",a);

          }

          getch();

}

 

 

OUTPUT :

ENTER THE STRING: KAMLESH

HAMLESK

 

NO OF WORDS ARE 1


 

Posted Date: 9/10/2012 2:54:00 AM | Location : United States







Related Discussions:- C program for rotation, Assignment Help, Ask Question on C program for rotation, Get Answer, Expert's Help, C program for rotation Discussions

Write discussion on C program for rotation
Your posts are moderated
Related Questions
C Program to Check  EVEN & ODD NO   main() {           int n, a;           clrscr();           printf("ENTER ANY NUMBER: ");           scanf("%d", &n);

Project Description: I'm seeking someone who could write me a torrent seeding client which supports multiple proxies. The goal of the project is to make torrents popular by seed

Convert a COV/CPE (Micosoft Fax Cover Page) file to a TIF image file Project Description: I would like a small API written that will take a COV/CPE file and replaced the corr

In this Lab you will code 8086 assembler equivalents (Virgo) for common C control flow instructions. This will give you an appreciation for how control flow is implemented in assem

The code contains two built-in pitfalls. First one, if it executes in a member function for an static, extern or automatic object, the program will possibly crash as soon as the de

Virtual Base Classes This ambiguity can be resolved if the class derived have only one copy of the class base. This can be done by making the base class a virtual class. This k


Ask question #Minimum 100 words accepted program for polishing jewels#

THEORY OF COMPUTER PROGRAMMING

Each of the following two procedures defines a method for adding two positive integers in terms of the procedures inc, which increments its argument by 1, and dec, which decrements