Question:Write c program which shutdown the window operating system? 

Answer Step 1: Write the following program in TURBO C.
#include<stdio.h>
#include<dos.h>

int main (void){
    system("shutdown -s");
    return 0;
}
Step 2: Save the above file. Let file name is close.c Step 3: Only compile the above program. Step 4: Now close the turbo c compiler and open that directory in window operating system where you have saved the close.c (default directory c:\tc\bin) Step 5: Double click on its .exe file (close.exe) After some time your window operating system will shutdown. 

+ Report
Total Preview: 907
Write c program which shutdown the window operating system?
Copyright © 2024. Powered by Intellect Software Ltd