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
A more advanced data type is the structure; here we can define a template as a collection of different variables e.g.     struct birthdate   {     int month;     int day;

Static Member Functions All the objects of the class share static data members of a class. The example above demonstrates how to keep track of all the objects of a class which

program for compiler design in c

Pointer Types Pointer holds the address of an object, permitting for the indirect manipulation of that object. They are used in creating linked data structures like lists, tree

This assignment is to be undertaken individually - no group work is permitted. Background information This assignment is an exercise in simple object-oriented programming and, acco

Program for Hangman Problem   #include   #include   #include   #include   #include   static void playGame();   static void printMistakes(int n);   st

HWID Spoofer for Windows 7, 8 x64 Project Description: I want a simple program that will spoof my hardware id. I should be able to prepare the id to spoof to in the program a

How many levels deep can include files be nested? - As such, there is no limit to number of levels of nested include files you can have however your compiler might run out of s

Write a 3-4 page paper (350 words per page) in APA format detailing the development and use of C++ in academia and in industry. Explain the pros and cons of C++ as a programming la

A: Use operator overloading to present a friend left-shift operator, operator #include class Fred { public: friend std::ostream& operator ... private: int i_; // onl