All pastes #39652 Raw Edit

Mine

public text v1 · immutable
#39652 ·published 2006-02-02 19:34 UTC
rendered paste body
void print_by_code () {
	int i,j;
	struct phonebook *temp,**entry2;
	entry2=entry;   
	for (i=0; i<phone_size; i++) {
		for(j=i+1; j<phone_size; j++) {
			if ((entry2[i]->code)<(entry2[j]->code)) {
			}
			else {
				temp=entry2[i];
				entry2[i]=entry2[j];
				entry2[j]=temp;
			}
		}
	} 
	printf("code username region time\n");
	for (i=0; i<phone_size; i++) {
		printf("%d %s %s %d\n",entry2[i]->code,entry2[i]->username,entry2[i]->region,entry2[i]->time);
	}
	printf("\n");
}