第二週作業 史旭棟

2021-09-24 23:37:48 字數 981 閱讀 6928

題目;

1:按照格式顯示當前時間,並儲存到指定檔案中:

command:date +%t | tee time.txt;

2:顯示/etc/passwd檔案的第15~18行內容:

command: head /etc/passwd -n 18 | tail -n 4;

3:顯示/bin目錄中,包含大寫大寫字母的檔案,儲存到指定檔案中,並統計行數:

4:在student使用者下查詢/etc/passwd ,遮蔽錯誤輸出:

5:在student使用者下查詢/etc/passwd ,分別儲存正確輸出和錯誤輸出到指定檔案:

6:4:在student使用者下查詢/etc/passwd ,儲存所有輸出到指定檔案:

第二週作業

實驗作業 1.編寫調式執行第乙個c 程式,要求輸出你的班級 姓名和學號 2.輸入課本例題1.2,除錯執行程式,並分析程式。3.分析程式中哪些是識別符號,哪些是關鍵字。4.回答什麼是程式 工程,原始檔 目標檔案 執行檔案 編譯預處理 名字空間 函式.主函式 功能 顯示輸出班級 姓名 學號 includ...

第二週作業

第一題 include stdafx.h int main int argc,char argv 第二題 include using namespace std int max int x,int y int main 好吧,老師我實在不知道錯在 啊。我都是照著書本來打的,打了幾次還是這樣。第三題 ...

第二週作業

作業1 輸出學生的班級 姓名和學號 include using namespace std int main 以下是主函式 int main 主函式 int number1,number2 定義兩個基本整型變數 number1和number2 cout 請輸入兩個數 輸出 請輸入兩個數 cin nu...