[問題] printf的位置
有的compiler竟然讓底下的fun_a build過了, 覺得很驚訝.
一直以為fun_b才是正確的用法.
請問有人知道這些規則訂在哪裡嗎?
int fun_a()
{
printf("this is fun_a \n");
int a=0;
return a++;
}
int fun_b()
{
int a=0;
printf("this is fun_b \n");
return a++;
}
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 60.250.129.225
※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1523937307.A.6AB.html
推
04/17 12:04,
7年前
, 1F
04/17 12:04, 1F
→
04/17 12:06,
7年前
, 2F
04/17 12:06, 2F
疏忽了....
→
04/17 12:07,
7年前
, 3F
04/17 12:07, 3F
請問有哪邊文件能參考嗎?
→
04/17 12:12,
7年前
, 4F
04/17 12:12, 4F
→
04/17 12:16,
7年前
, 5F
04/17 12:16, 5F
→
04/17 12:18,
7年前
, 6F
04/17 12:18, 6F
→
04/17 13:04,
7年前
, 7F
04/17 13:04, 7F
→
04/17 13:18,
7年前
, 8F
04/17 13:18, 8F
充行數的 不重要....
→
04/17 13:40,
7年前
, 9F
04/17 13:40, 9F
※ 編輯: dobeqoo (61.220.35.86), 04/17/2018 13:54:20
→
04/17 14:52,
7年前
, 10F
04/17 14:52, 10F
推
04/17 23:22,
7年前
, 11F
04/17 23:22, 11F
→
04/17 23:22,
7年前
, 12F
04/17 23:22, 12F
→
04/17 23:23,
7年前
, 13F
04/17 23:23, 13F
推
04/19 08:20,
7年前
, 14F
04/19 08:20, 14F
→
04/20 00:39,
7年前
, 15F
04/20 00:39, 15F
推
04/21 08:06,
7年前
, 16F
04/21 08:06, 16F
推
04/21 17:00,
7年前
, 17F
04/21 17:00, 17F