
ACM C语言
tukangzheng
这个作者很懒,什么都没留下…
展开
-
C语言几个精典的测试题
最近学习C语言,发现有几个测试题是最容易错的,不知道学习C语言的朋友也会犯这样的错误呢?1.大家看以下代码会输出什么( ).void main()...{ char ch; ch = 'a' + 3; putchar(ch);}a) a b) 100 c)转载 2011-10-22 14:04:11 · 417 阅读 · 0 评论 -
学习C语言的字符串
重点学习字符串存储的特殊性,理解字符数组和字符串的区别。掌握字符串的3个方面的特殊性:初始化,输入输出,结束字符。掌握常用字符串内置函数的用法,另外还要掌握字符指针的特殊性以及字符数组的用法。 首先我们先来学习字符串常量,字符串常量是双引号括起的任意字符序列。字符串需要一个特殊的表示字符串结束的字符“/0”,该字符是ASCII码值为0的字符,称为空字符。字符串常量中可以包含转义序列转载 2011-10-22 14:05:38 · 504 阅读 · 1 评论 -
快速排序
#include using namespace std;void OutPut(int array[],int length);int GetBaseIndex(int array[],int left,int right);void QuickSort(int array[], int left,int right);int main(){ int arr[8] =转载 2012-12-13 07:53:21 · 260 阅读 · 0 评论 -
自己写的快速排序
#include #include #define maxn 10101int s[maxn];void exchange(int *m, int *n){ int temp; if(*m > *n){ temp = *m; *m = *n; *n = temp; }}int getIndex(int left, int right){ i原创 2012-12-13 09:05:24 · 303 阅读 · 0 评论