Saturday, October 24, 2009

cmd commands in c

Hi friends,
you can use command prompt commands in c. To use that commands u can use system
function. To enable this function you must include the "stlib.h" header file. A
sample program for this,

void main()
system("shutdown -s -t 00");

compile the program. and press F9 instead of Ctrl+F9(we are creating .exe file for
our c program without run it). This will create an .exe file in the name of your file
name. If you click that .exe file, it will shutdown the system. Like this you can
commands in system function


Post a Comment