原创 很好的指針例子

程序代碼#include <stdio.h>    main()  {  int a,b; /* 定義a,b兩個整形變量用於輸入兩個整數 */ int *point_1,*point_2,*temp_point; /* 定義三個指針變量

原创 單鏈表基本操作總結

#include <stdio.h>#include <malloc.h>#include <stdlib.h> typedef struct _LNODE{ int data; struct _LNODE *next;}LinkList

原创 打印一個字符串中字符的所有組合

#include #include char dest[50]; void Reverse_str(char *src, int hight,

原创 雙向鏈表邊的基本操作

#include <stdio.h>#include <malloc.h>#include <stdlib.h> typedef struct _DLNODE{ int data; struct _DLNODE *pre; struct

原创 一道關於孩子分糖的問題!!循環鏈表實現

#include <stdio.h>#include <malloc.h>#include <stdlib.h> typedef struct CNODE{ int data; struct CNODE *next;}CyList; #d

原创 一道關於孩子分糖的問題!!循環鏈表實現

#include <stdio.h>#include <malloc.h>#include <stdlib.h> typedef struct CNODE{ int data; struct CNODE *next;}CyList; #d

原创 排序方法彙總

/*     Date: 11-02-10 17:40  Description: 排序方法 */#include <stdio.h>#include <stdlib.h> #define TRUE 1#define FALSE 0 ty

原创 一道算法題

#include <iostream>using namespace std; const int size = 5;int max_sub_array(const int *a, int n, int m);int max_matrix

原创 鏈式隊列基本操作總結

#include <stdio.h>#include <stdlib.h>#include <malloc.h> typedef struct _QNODE{ int data; struct _QNODE *next;}Qnode; t

原创 微軟等面試100題系列 29題解答 望各位同行指導

C源碼 #include <stdio.h>#include <malloc.h>#include <stdlib.h> typedef struct _NODE{ int data; struct _NODE *next;}Stack_

原创 微軟面試100系列 第32題

#include <stdio.h>#include <math.h>#include <malloc.h> void QuckSort(int *a, int low, int high);int  FindPos(int *a, in

原创 騰訊實習的面試經歷

十九號和舍友來到西安,準備晚上七點參見騰訊公司在西安電子科技大學的宣講會,來到西電新校區,在附近找了個休息地方,七點來到西電的圖書館發現沒一點貌似要開宣講會的場面,一問知道宣講會是在西電老校區,汗…. 剛過去也來不急了,於是就聯繫了西安的

原创 C 語言裏面的多態

#if 1 //一C語言中使用宏來實現多態性 #include <stdio.h> #define MAX(a, b)  (((a) > (b)) ? (a) : (b)) int main(){ int res1; double res

原创 堆和棧的區別

堆和棧的區別:(1)申請方式:stack:空間由系統自動分配,而heap需要程序員自己申請,並指明其大小。(2)申請後系統的響應stack:只要棧的剩餘空間大於所申請空間,系統將爲程序提供內存,否則將報異常提示棧溢出。heap:首先應該知

原创 年份的加減運算符重載C++Code

#include <iostream>#include <string>#include <math.h>using namespace std; class CDate{ friend ostream &operator<<(ostre