C program for count sorted characters, C/C++ Programming

Assignment Help:

 

# include stdio.h>

# include conio.h>

# include string.h>

void main()

 

{

          int i=0,j=0;

          char a[100],temp;

          clrscr();

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

          {

                   a[i]=0;

          }

          i=0;

          printf("\nENTER THE STRING: ");

          gets(a);

          for(i=0;a[i]!='\0';i++)

          {

                   for(j=0;a[j]!='\0';j++)

                   {

                             if(a[i]

                             {

                                      temp=a[i];

                                      a[i]=a[j];

                                      a[j]=temp;

                             }

                   }

          }

          for(i=0;a[i]!='\0';i++)

          {

                   printf("%c",a[i]);

          }

          getch();

}

OUTPUT :

ENTER THE STRING: KAMLESH D MENGAR

 AADEEGHKLMMNRS


Related Discussions:- C program for count sorted characters

Function, limitation of function

limitation of function

When i develop a destructor, When I develop a destructor, do I require to e...

When I develop a destructor, do I require to explicitly call the destructors for my member objects?

Struct items, how to make a program this struct items/product

how to make a program this struct items/product

Algorithm, Write algorithms to implement the insertion and deletion operati...

Write algorithms to implement the insertion and deletion operations.

What does throw; (with no exception object after the throw , What does thro...

What does throw; (with no exception object after the throw keyword) mean? Where would I employ it? A: You should see code that looks something like this: class MyException

Coding, dispaly the last ant on rod

dispaly the last ant on rod

Board colouring, in this problem you are given a board in which some of the...

in this problem you are given a board in which some of the elements are placed..each element represent ancolor.fill the other elements in the board such that none of the adjacent e

C program to swap the two values, Program is to swap the two values which a...

Program is to swap the two values which are enter by user: Program is to swap the two values which are enter by user through the function with values changed using pointers

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd