随笔分类 - C
摘要:#include <stdio.h> #define NUMBER 100 int push_queue(int* a, int rear, int data) { a[rear] = data; rear++; return rear; } void pop_queue(int* a, int f
阅读全文
摘要:#include<stdio.h> struct tree { int data; int l_ch; int r_ch; }; void add_node(struct tree* arr_1,int *arr,int start_index,int index) { arr_1[index].d
阅读全文
摘要:#include <stdio.h> #include <stdbool.h> #include <stdlib.h> typedef struct node { int data; struct node* next; }Node; typedef struct line_stack { Node
阅读全文
摘要:#include <stdio.h> #define NUMBER 100 int push(int* a, int top, int data) { a[++top] = data; return top; } int pop(int* a, int top) { if (top == -1) {
阅读全文
摘要:#include <stdio.h> #include <stdlib.h> struct node { int data; struct node *next; }; void init_node(struct node **p) { *p = malloc(sizeof(struct node)
阅读全文
摘要:1.静态变量有名字,可以直接对其操作,而动态变量是一段地址需要通过指针间接地对它进行操作2.静态变量的分配与释放由编译器自动处理,动态变量的分配与释放是由程序员显示的管理,它通过malloc()和free()两个函数完成
阅读全文
摘要:#include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sys/socket.h> #include <string.h> #include <netinet/in.h> #include <arpa/inet.
阅读全文
摘要:#include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sys/socket.h> #include <string.h> #include <netinet/in.h> #include <arpa/inet.
阅读全文
摘要:服务端: #include <stdio.h>#include <stdlib.h>#include <sys/types.h>#include <sys/socket.h>#include <string.h>#include <netinet/in.h>#include <arpa/inet.h
阅读全文

浙公网安备 33010602011771号