Code:
struct node_s
{
int key;
node_s * next;
}note _t;
The problem here is that you don't have a record yet. All you have is a key. It isn't too difficult to switch records between nodes, but it would be more difficult to try to disassemble your whole list. So make your example more mature like so:
Code:
struct rec
{
int key;
char array[30];
double income;
}rec_t;
struct node_s
{
struct rec_t rec;
node_s *next;
}node_t;
Now when you compare keys, you can just switch records (rec_t), rather than disassemble your list.