摘要:
C语言里面的 静态变量 静态全局变量 全局变量 其中静态变量和普通变量的截取模式是一样的,只是因为他赋值不被丢弃,所以能修改成功 code: #import <Foundation/Foundation.h> int global_val = 1; static int static_global_ 阅读全文
摘要:
#include <stdlib.h> #include <stdio.h> void select_sort(int a[], int n) { for(int i=0; i < n-1; i++) { int j = i; int min = a[j]; for(int k=i + 1; k < 阅读全文
摘要:
#include <stdio.h> #define SIZE 8 void bubble_sort(int a[], int n); void bubble_sort(int a[], int n) { int i, j, temp; for (j = 0; j < n - 1; j++) for 阅读全文
摘要:
/// <summary> /// 插入排序 /// </summary> /// <param name="unsorted"></param> static void insertion_sort(int[] unsorted) { for (int i = 1; i < unsorted.Le 阅读全文