"其他 01" 修訂間的差異
出自 陳富國維基館
(新頁面: 請問下列片段程式執行後,產生一檔案test2.txt,其內容為何?(此題三分) #include <fstream.h> #include <string.h> void main() {char str...) |
(無差異)
|
於 2013年3月28日 (四) 19:18 的最新修訂
請問下列片段程式執行後,產生一檔案test2.txt,其內容為何?(此題三分)
#include <fstream.h>
#include <string.h>
void main() {char str[]="OPP is not difficult to learn,\
\n as long as you try your best to study.\
\n No hard work no success!";
ofstream output(“test2.txt"); for ( int i = 0; i <(int)strlen(str); i++ )
output.put(str[i]);
output.close(); }
解答
Ans: OPP is not difficult to learn,
as long as you try your best to study.
No hard work no success!
解說:
類似題型
題目
解說:
| 程式觀念考題 | |||||
|---|---|---|---|---|---|
| 基本程式語言 | 決策程式語法 | 迴圈/重複敘述 | 副程式呼叫與遞迴 | 物件導向-類別與物件 | 其他 |
|
|
06 . 07 . 08 . 09 . 10 11 . 12 . 13 . 14 . 15 |
06 . 07 . 08 . 09 . 10 11 . 12 . 13 . 14 . 15 |
06 . 07 . 08 . 09 . 10 11 . 12 . 13 . 14 . 15 |
06 . 07 . 08 . 09 . 10 11 . 12 . 13 . 14 . 15 |
06 . 07 . 08 . 09 . 10 11 . 12 . 13 . 14 . 15 |