討論串[問題] ++運算符號實際運作的時機?
共 3 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓6(6推 0噓 17→)留言23則,0人參與, 最新作者cheinhun (abc)時間16年前 (2009/06/27 18:12), 編輯資訊
0
0
0
內容預覽:
雖然我不常寫c不過看好像沒人要理你這個問題. 我就來點你一下好了,先說~我是看你的實驗說故事的. 你第一個宣告指標c. int* c=1;. 是把指標c指到1這個位置了. 而. printf("c++ is %d\n", c++);. 印出了c這個指標位置1 再移到下一個位置. 不過你宣告的是int
(還有127個字)

推噓3(3推 0噓 13→)留言16則,0人參與, 最新作者giveatry (new life)時間16年前 (2009/06/27 08:20), 編輯資訊
0
0
0
內容預覽:
我改成這樣的時候. #include <stdio.h>. #include <stdlib.h>. int main(){. int* c = (int*)malloc(sizeof(int)*1);. *c = 1;. printf("c++ is %d\n", c++);. printf("c
(還有3個字)

推噓2(2推 0噓 7→)留言9則,0人參與, 最新作者giveatry (new life)時間16年前 (2009/06/27 07:51), 編輯資訊
0
0
0
內容預覽:
#include <stdio.h>. int main(){. int* c = 1;. printf("c++ is %d\n", c++);. printf("c is %d\n", c);. return 0;. }. 印出來的結果. c++ is 1. c is 5. 為什麼會這樣呢ꄊ謝謝
首頁
上一頁
1
下一頁
尾頁