Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
C Program for SORTING OF LONG WORD WITH DIFFERENT STRING
#include stdio.h>
#include conio.h>
#include string.h>
void main()
{
char n[50],c[25][25];
int i=0,j=0,k=0,temp,t=0,t1=0,l[25],l1[25];
clrscr();
for(i=0;i<25;i++)
for(j=0;j<25;j++)
l[i]=0;
l1[i]=0;
c[i][j]='0';
}
i=0; j=0;
printf("ENTER THE STRING= ");
do
n[i++]=getchar();
}while(n[i-1]!='\n');
n[i-1]='\0';
for(i=0;n[i]!='\0';i++)
if(n[i]!=' ')
l[t]=l[t]+1;
l1[t]=t+1;
c[t][t1++]=n[i];
else
t++;
t1=0;
for(i=0;l[i]!=0;i++)
for(j=0;l[j]!=0;j++)
if(l[i]>l[j])
temp=l[i];
l[i]=l[j];
l[j]=temp;
temp=l1[i];
l1[i]=l1[j];
l1[j]=temp;
if(l1[i]==j+1)
for(k=0;c[j][k]!='0';k++)
printf("%c",c[j][k]);
printf("\n");
getch();
OUTPUT :
ENTER THE STRING: KAMLESH
ENTER THE STRING: MENGAR
ENTER THE STRING: JAMNAGAR
ENTER THE STRING: BCA
ENTER THE STRING: SEM2
JAMNAGAR
KAMLESH
MENGAR
SEM2
BCA
Identify 2 to 3 existing algorithms commonly used for object tracking. Algorithms should be in C or written in MATLAB language. Document these algorithms in flowcharts and run thes
given integer ''n'' and permutation of numbers 1,2,..n-1, c program to print permutation that lexicograghically precedes given input permutation if permutation is least print input
Develop a program to meet the following requirements: 1. Must use at least one function in addition to main (you can use more) 2. Must use selection 3. Must use deference/indire
There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides. But he sometimes mistakes doing tha
countSpaceAvailbility function that counts and returns the space availability in the circle queue there are two elemnts at the circle queue and should return 5 space if size 7 .
Destructor: The purpose of destructor is to free the memory when the compiler memory is reduced or not enough to execute certain program. Sometimes there may several objects op
Selection sort - C program: Write a program to define a selection sort. void main() { clrscr(); int a[100],ch,n; cout cin>>n; for (int i=0;i
Assume that a Binary Search Tree is constructed by repeatedly inserting exact values in to the tree. Argue that the number of nodes examined in searching for a value in the tree is
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
sample of program that use in bubble sort using assignment operator in c++
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!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd