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
Explain Formatted Input Output with File Pointer? Likewise there are equivalents to the functions scanf and printf which write or read data to files. These are called fscanf a
I have to add virtual void calculatePay and virtual void displayEmployee. How to I implement that in Salaried and Hourly Employee?
Project Description: Not just like that though. I want a similar program that can scan through poker lobbys (pokerstars, full tilt, ongame and ipoker) and seat me to the left of
Explain string constants in c language - Escape Sequences? Illustrations are "945", "hello", "well done", "5+3". The character constant (example 'x') isn't equivalent to the st
Within programs we very often want to execute a different section of code, depending upon various conditions within C the If statement is used to achieve this. The If statement con
Task Your task is to write a program, words, that reports information about the number of words read from its standard input. For example, if the file qbf.txtcontains the text th
Write a program called OddEven that will prompt the user for an integer and print/display a message indicating whether it is even or odd. Continue prompting for numbers from the us
C program to string compression: Write a program to define a sting and all operations on string. void main() {
1. The management of a company would like to determine the median annual salary of its employees.Write a pascal program that display the number of employees and their median salary
I want to change C++ code to Python extension Project Description: I have the C++ source code for an executable that takes a path to an image file as the input and prints tex
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