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

Ans, A palindrome is a string that reads the same from both the ends. Given...

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

Prepare an application in c# or c++, Prepare an Application in C# or C++ ...

Prepare an Application in C# or C++ Project Description: We are seeking someone who can write a program in C# or C++. The idea is to prepare the program using a Cross Plat

Coding, Problem Statement: You have to write a C program to develop a Car P...

Problem Statement: You have to write a C program to develop a Car Parking Management System for a busy commercial area. The system will record the car plate number, date and time w

C++, #questAt a shop of marbles, packs of marbles are prepared. Packets are...

#questAt 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 wit

#title. RETIRED ON SOCIAL SECURITY., IS IT POSSIBLE FOR YOU TO WRITE A PR...

IS IT POSSIBLE FOR YOU TO WRITE A PROGRAM FOR ME TO MEASURE EXISTING ANGLES AND DO IF AND THEN FROM THIS , AND TO PLACE FIXED ANGLES AT CERTAIN POSITION AS A ADD WITH DLL FOR CERTA

Verification class, I need help to understand and do this assignment ******...

I need help to understand and do this assignment ********************************************************* You are to insert the missing code in the C program given for combinatio

Area under curve., write a c progrm to find area under the cuve y=f(x)  ...

write a c progrm to find area under the cuve y=f(x)   #include float start_point, /* GLOBAL VARIABLES */ end_point, total_area; in

Credit Card Validation Check digit, Use 16 digit credit card numbers that c...

Use 16 digit credit card numbers that contain 15 digits an 1 check digit. The format of the card number consists of the 15 digits followed by the check digit. The check digit is co

Padovan string, A Padovan string P(n) for a natural number n is defined as:...

A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concate program 1 : package test

Java code, Calculate the salary if the person work 8 hours/day and the sala...

Calculate the salary if the person work 8 hours/day and the salary/hour is RM5.20 - UML class diagaram -Class -Exception handling/assertion

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