+ 1
Can any one help me to slolve my problem?
Can anyone help me to solved my problem . The output like this , if i input qqwndjjdbdnd the result willl q=2 , w=1 , n=2 , d=3 , j=2 , b=1 after that sort the value of the abjad from the biggest to the smallest and the final result will like this d=3,q=2,j=2,n=2,b=1,w=1
14 odpowiedzi
+ 7
Please, explain your problem better.
+ 3
create a structure containing both data type variables as it's members.
say
struct data {
int x;
char c;
};
Then create an array of the above struct
data arr [10];
Now, sort through the array as required.
+ 2
You can use pointer but it should work without pointer also.
+ 2
Please go through the code.
https://code.sololearn.com/cPRA9pRpMWoZ/?ref=app
Suggest if it worked for you.
+ 2
@Maski check this out
https://code.sololearn.com/cfeb106zuW5E/?ref=app
+ 1
@Maski I am on it.
0
You can place the letter and the count in a two dimensional array and then sort on the count element cell.
0
there is 2 different data type on this case how can i use two dimensional of array?
0
int for the count , and char for the character
0
so i must use pointer ? @devender Mahajan
0
how can it work without pointer @devender Mahajan , can you help me?
0
yeh like that , but i mean the count is sorted from the higest to lowest , the alphabet its oke if not sorted @devender mahajan
0
thanks @devender mahajan you are very helpfull