reverse linked list function

Can you please check my reverse linked list function? does look okey? thanks.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
void ReverseLinkedList (nodeType *first)
{
	nodeType *q,*r,*s;
	q=first;
	r=NULL;
	while(q!=NULL)
		{//all of these pointers proceed one step ahead
			s=r;
			r=q; 
			q=q->link;
			r->link=s;
		}

		first=r;
		
}
I do not like your variable names. It is difficult to understand what do they mean.
Topic archived. No new replies allowed.