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

 

# 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

Posted Date: 9/10/2012 4:19:42 AM | Location : United States







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

Write discussion on C program for count sorted characters
Your posts are moderated
Related Questions
The STL details are described in many places online (see the CS377 webpage for some links), and there's a very quick introduction in Section A.14. Here are just a few additional no

Write a C++ program which does the following: 1. Asks the user to enter the following text "Four score and seven years ago there was a man named Joey Bagadonuts." 2. Save thi


the program that solve the efficiency of otto cycle

Constructor public class ListNode {    // package access members; List can access these directly private E data; // data for this node privateListNode nextNode; /

Problems With Multiple Inheritance The following example presents a problem with multiple inheritance. class Aclass  {   public :  void put()

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

Want a scraping program created Project Description: We need to hire a professional developer to scrape the site for information such as *product title *Product Price

Define Commonly Used Built-in Library Functions? Comprise opened a file pointer you will desire to use it for either input or output. The C language supplies a set of functions

At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets with thes