精品丰满熟女一区二区三区_五月天亚洲欧美综合网_亚洲青青青在线观看_国产一区二区精选

  • <menu id="29e66"></menu>

    <bdo id="29e66"><mark id="29e66"><legend id="29e66"></legend></mark></bdo>

  • <pre id="29e66"><tt id="29e66"><rt id="29e66"></rt></tt></pre>

      <label id="29e66"></label><address id="29e66"><mark id="29e66"><strike id="29e66"></strike></mark></address>
      學(xué)習(xí)啦>學(xué)習(xí)電腦>電腦故障>電腦故障現(xiàn)象>自動(dòng)重啟>

      c語言電腦重啟代碼

      時(shí)間: 楚煥725 分享

        c語言中的電腦重啟代碼,你知道多少?或許不是學(xué)IT的都不是很了解這個(gè),或者說學(xué)IT的小白也都不是很了解這個(gè)代碼,那么下面就由學(xué)習(xí)啦小編帶你看看吧!

        c語言 電腦重啟代碼

        代碼步驟:

        system("shutdown -r");就是重啟命令

        #include

        int main (){

        system("shutdown -r");

        return 0;

        }

        1、system函數(shù):

        原型:int system(const char * command);

        功能:執(zhí)行 dos(windows系統(tǒng)) 或 shell(Linux/Unix系統(tǒng)) 命令,參數(shù)字符串command為命令名;

        說明:在windows系統(tǒng)中,system函數(shù)直接在控制臺(tái)調(diào)用一個(gè)command命令。在Linux/Unix系統(tǒng)中,system函數(shù)會(huì)調(diào)用fork函數(shù)產(chǎn)生子進(jìn)程,由子進(jìn)程來執(zhí)行command命令,命令執(zhí)行完后隨即返回原調(diào)用的進(jìn)程;

        頭文件:stdlib.h;

        返回值:命令執(zhí)行成功返回0,執(zhí)行失敗返回-1。

        2、例程:

        #include#includeint main(){system("del C:3.txt");//在控制臺(tái)中,執(zhí)行命令del C:3.txt,刪除C盤目錄下的123.txt文件return 0;}

      539110