PDA

View Full Version : Sorting array



rubbio_young
10-15-2009, 02:40 PM
Hi
I have a bunch of array:

array[0]=Peter
array[1]=45
array[2]=Architect

array[3]=Jenni
array[4]=21
array[5]=Singer

array[6]=Sarah
array[7]=29
array[8]=Teacher

I would like to put the title Name, Age and Job besides the array as below:

Name[0]=Peter Age[1]=45 Job[2]=Architect
Name[3]=Jenni Age[4]=21 Job[5]=Singer
Name[6]=Sarah Age[7]=29 Job[8]=Teacher

Can you help me in C please. Thank you!

juan_tomaz
10-19-2009, 05:38 PM
you need to create an array of strings

ashely
10-23-2009, 08:01 PM
You need to define the type of array it is before you can store any information in it.

I think you should spend a bit more time trying to grasp the concepts before attempting to seek help.