藍影的資料結構學習網誌
顯示具有
指標
標籤的文章。
顯示所有文章
顯示具有
指標
標籤的文章。
顯示所有文章
2010年6月13日 星期日
作業十五:迷宮換路徑
/* 程式範例: Ch5-4-1.c */
#include <stdio.h>
#include <stdlib.h>
閱讀更多 »
2010年6月8日 星期二
作業十四:儲存多項式
/* 程式範例: Ch4-6.c */
#include <stdio.h>
#include <stdlib.h>
struct Node {
/* Node節點結構 */
float coef; int exp;
/* 結構變數宣告 */
struct Node *next;
/* 指向下一個節點 */
};
閱讀更多 »
2010年6月6日 星期日
猜數字遊戲,幾A幾B的那種《指標版》
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
閱讀更多 »
2010年5月2日 星期日
作業十:指標與字串
/* 程式範例: Ch3-4-1.c */
#include <stdio.h>
#include <stdlib.h>
#define LEN 16
閱讀更多 »
作業九:指標與結構
/* 程式範例: Ch3-3.c */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
閱讀更多 »
2010年4月25日 星期日
九九乘法表及值的變化
/* 程式範例: Ch3-2-2.c */
#include <stdio.h>
#include <stdlib.h>
#define ROWS
9
#define COLS
9
/* 主程式 */
閱讀更多 »
2010年4月19日 星期一
C語言的字串與指標
C語言的字串是字元陣列,實際上沒有字串這種資料型態。
在C語言裡,你可以用””雙引號括住一個以上的任意字元來代表字串,如果只是要顯示,則可以直接
printf
就可以。但若是要儲存成變數供後續使用,只有兩種方式:(1)字元陣列;(2)指標。
閱讀更多 »
較舊的文章
首頁
訂閱:
意見 (Atom)