Subscribe

RSS Feed (xml)

Monday, January 26, 2009

Write a C program to Shut down the computer.

int main( )
{
system("shutdown -s");
return 0;
}

Explanation:-
Save the above .Let file name is shut.c and compile and execute the above program. Now close the turbo c compiler and open the directory in window where you have saved the internet.c ( default directory c:\tc\bin)and double click the its exe file( shut.exe).

5 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. This comment has been removed by a blog administrator.

    ReplyDelete
  3. how to print a string adjacent to another string.
    eg:
    strin1=sas,string2=sai
    result=sassai
    note:without using strcat

    ReplyDelete