Á½¸öÁ´±íµÄÁ¬½ÓÎÊÌâ c¸ßÊÖÇë½ø
ÒÑÓÐa,bÁ½¸öÁ´±í£¬Ã¿¸öÁ´±íÖеĽáµã°üÀ¨Ñ§ºÅ£¬³É¼¨¡£ÒªÇó°ÑÁ½¸öÁ´±íºÏ²¢£¬°´Ñ§ºÅÉýÐòÅÅÁÐ
Á¬½Óº¯ÊýÓÐÎÊÌâ Çë¸ßÊÖÖ¸µã
#include <stdio.h>
#include <stdlib.h>
struct student{
int number;
int score;
struct student * next;
};
struct student * creat(){
int number;
int score;
struct student *head = NULL;
struct student *q = NULL;
struct student *p = NULL;
p = (struct student *)malloc(sizeof(struct student));
scanf("%d,%d",&number,&score);
while(number != NULL){
p->number = number;
p->score = score;
p->next = NULL;
if(head == NULL)
head = q = p;
else{
q->next = p;
q = p;
}
p = (struct student *)malloc(sizeof(struct student));
scanf("%d,%d",&number,&score);
}
p->next = NULL;
return head;
}
struct student * insert(struct student * ah,struct student * bh){
struct student * pa1, *pa2;
struct student * pb1, *pb2;
pa1 = pa2 = ah;
pb1 = pb2 = bh;
do{
while((pb2->number > pb1->number) && (pb1->next != NULL)){
pa2 = pa1;
pa1 = pa1->next;
}
pb2 = pb2->next;
pb1->next = pa1;
pa2->next = pb2;
pa2 = pa2->next;
pb2 = pb1
Ïà¹ØÎÊ´ð£º
ÔÚueÖдÓÔ¶³ÌunixÓöþ½øÖÆ·½Ê½ÏÂÔØcÎļþµ½±¾µØ£¬ÐÞ¸ÄÖ®ºóÓöþ½øÖÆ·½Ê½ÉÏ´«µ½unixÖУ¬ÔÙÓÃvi´ò¿ª¸ÃÎļþ£¬Ã¿ÐкóÃæ¾Í»áÓÐÒ»¸ö^MµÄ»»Ðзû£¬Èç¹û²ÉÓÃascii·½Ê½ÏÂÔØ£¬¶þ½øÖÆ·½Ê½ÉÏ´«µÄ»°¾ÍûÓÐ^M£¬ÄÇÇëÎÊÕâÑù»á¶Ô³ÌÐòÎļþ ......
struct s1 {
char ch, *ptr;
union {
short a, b;
unsigned int c:2, d:1;
}
struct s1 *next;
};
Ö÷Òª¿´²»¶®·ûºÅ¡¡:
Çë´ïÈËÖ¸µãÒ»¶þ
http://blog.cechina.cn/true ......
ÔÚCÓïÑÔÖÐÈçºÎ´ò¿ªÒ»¸öÒÑÖªµÄÎļþ¡£Èç´ò¿ªÃûΪadd.txtµÄÎļþ¼ÙÉèËüÔÚC:\\Promgram Files\add.txt.ÒªÇó´ò¿ªÊ±²»¸Ä±äÆäÀïÃæµÄÄÚÈÝ¡£¸ßÊÖÇë½â´ðϰ¡
fopen( "C:\\Promgram Files\add.txt" , "rb" ......
±ÈÈçÊý×éarray[100]="12@good@thanks@men@";
Ôõô×ö²ÅÄܽ«array1[100]="12";array2[100]="good";array3[100]="thanks";array4="men";
ÐèÒªÔõô×öÄØ?CÀ ......
±àдһ¸ö³ÌÐòÓÃÁ´±íʵÏÖ£º½«Ò»¸öÉýÐòÕûÊýÊýÁеÄÖØ¸´Êý¾ÝÈ¥µô
±àºÃºó£¬½á¹û²»¶Ô°¡£¬ÇóÖúc¸ßÊÖ
#include <stdio.h>
#include <stdlib.h>
struct link
{
int number;
s ......