# Thread: How is it possible to solve this problem

1. ## How is it possible to solve this problem

For this lab exam you will try to store and sort the records of workers of a company. These records are composed by subfields (separated from each other by one white space) containing information about the worker. Because of missing or additional informations each workers record can have different number of subfields. Each subfield of a record will be composed of numbers and letters and it can have different length. Each persons records first subfield will be the workers unique ID. This ID will be composed of numbers and letters like other subfields. According to these informations an example record can be like these ones:

62gDF345 AnDeRs Friden vocalist 3334455
Eh43 JeSPer guitarist swedish

Your program will get a bunch of records each one separated by a new line character. After storing these records, you will sort the records ascending (increasing order) according to their IDs (first subfield). The ordering will be case insensitive (B is same as b) and the letters are considered bigger than the numbers.

The list of records will end with an extra new line character and there will be one query to control your algorithm. The query will be composed of three integers. The first one is the records number in the ordered list, the second one is the wanted subfields number, and the third one is the wanted characters number of this subfield. For example if the integers are x,y,z after sorting the records, you will print the x th records, y th subfields, z th character.

Some of the important points are:
--------------------------------
-Sorting will be case insensitive (b=B) and letters are considered bigger than numbers.
-The first record is considered 0 th record
-ID of each person is considered 0 th subfield of his record
-The first character of each subfield is considered the 0th subfield
-Each record can have different number of subfields
-Each subfield can have different length
-Each subfield can be composed of numbers or letters
-Subfields are separated by a single white space
-Records are separated by a new line character
-End of records is made by an extra new line character and it is followed by three integers

-I have found out how to store the data,but i couldnt sort it.

2. How did you manage to sort them? I have opened the same thread yesterday, if I'm not wrong you can try to sort them with strcmp function(if you've taken the inputs string by string), otherwise you have to compare char by char.

3. Seems to me like your listing your homework... that wouldn't be breaking the rules regarding homework would it?

4. No, it's not a homework. It's just a question that we have to solve and we can get help from anywhere we want. Believe me, our homeworks are much complicated =) But if you think opening a thread like this breaks the rules, I'm sure ahmet858585 will do the necessary things.

5. He isn't asking for specific help, he's bluntly asking for the worked solution NOT help for something C related.

6. I think you're right. Sorry for inconvenience

7. 99&#37; percent
ahmet858585 == Meursault

8. This type of program was posted by someone else, namely Meursault.