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
make a marksheet of 2 student with 5 subject
y0our wish
Depreciation to a salvage value of 0. For tax purposes an item may be depreciated over a period of several years, n. With the straight line method of depreciati
a) Implement a binomial tree class with a method that calculates the value of an option passed in to the class. The binomial tree should not rely on specific features of the differ
Explain what are Unions? The Unions like as structures, contain members whose individual data types may perhaps differ from one another. Though the members that create a union
#question.develop an algorithm using pseudocode for computing cos(x) and sin(x). use a sentinel controlled while loop. use the series definition of e^+-jx
Described the ISA and HASA class relationships. How would you apply each in a class design? A: A specialized class "is" specialization of another class and, thus, has the ISA re
A: A smart pointer is a C++ class which mimics a regular pointer in syntax and some semantics, however it does more. Since smart pointers to distinct types of objects tend to have
Create an array of Strings and fill it with some interesting text, such as vacation destinations, album names, or weapon names from a CRPG. Display three elements of the array on t
The definition of an object(variable ): We can explain a variable(set memory to the variable) in the following ways. e.g. double salary; int month; When more than o
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