摘要:
#include <stdio.h>#include <stdlib.h>#include <string.h>struct test{ char* name; int age; int qq;} date[]={ { "solq",18,33333 }, { "wei cheng",20,444444 }, { "hong",55,5555555 }};int sreach(struct test* ar,char* name);int main(int argc, char* argv[]){ 阅读全文
摘要:
#include <stdio.h>void qsort(int s[], int l, int r){ int i, j, x; if (l < r) { i = l; j = r; x = s[i]; while (i < j) { while(i < j && s[j] > x) j--; /* 从右向左找第一个小于x的数 */ if(i < j) s[i++] = s[j]; while(i < j && s[i] < x) i++; /* 从左向右找第一个大于x的数 */ if(i < j) 阅读全文