看板 C_and_CPP 關於我們 聯絡資訊
想請問BC是甚麼意思 感恩~~ http://goo.gl/6tgJR Static 6. What are the uses of the keyword static? This simple question is rarely answered completely. Static has three distinct uses in C: (a) A variable declared static within the body of a function maintains its value between function invocations. (b) A variable declared static within a module[1], (but outside the body of a function) is accessible by all functions within that module. It is not accessible by functions within any other module. That is, it is a localized global. (c) Functions declared static within a module may only be called by other functions within that module. That is, the scope of the function is localized to the module within which it is declared. Most candidates get the first part correct. A reasonable number get the second part correct, while a pitiful number understand answer (c). This is a serious weakness in a candidate, since they obviously do not understand the importance and benefits of localizing the scope of both data and code. -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 220.139.97.127 ※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1462689458.A.F0B.html
CoNsTaR: http://bit.ly/1YfHsbD 05/08 14:49
bjk: 其實這個我看了中文還是不太懂QQ 05/08 15:20