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

why is programming is needed now-a-days.what is the benefit of colleges to apply heavy loads on students head.

The heart of the modern electronic system is the microprocessor e.g. the video, sound, game consoles, portable phones and domestic appliances. Let us consider the heart of a home c

Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send

A constructor that accepts one argument of a dissimilar type.

Command-line arguments are passed into programs using the arguments of main(). Here's a quick example, for a program called by typing "progname file.txt 1 2.7": #include #incl

Write a program that allows user to enter number of elements in an array. The program then allows user to enter the elements. Write a function called max that returns the position

padovan string for n natural numbers p(n)=1,p(n)=2,p(n)=3 and use padovan formul to get output 1

Input Output Most languages have "statements" to perform I/O . Though in C and C++ we use "functions" to perform I/O. C++ also has its own I/O mechanism - the cin and cout obje

In this assignment you are required to develop a program that allows the creation, viewing and storage of information about ITECH7603 Students. In order to complete the task you ha