BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan

BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan (http://bzupages.com/)
-   Networking/Ethical Hacking (http://bzupages.com/264-networking-ethical-hacking/)
-   -   A C Program to shutdown the computer.. (http://bzupages.com/f264/c-program-shutdown-computer-15892/)

JuNaiDiQbaL 06-05-2011 10:49 PM

A C Program to shutdown the computer..
 
#include 'stdio.h'
#include 'conio.h'
void main()
{
system("shutdown -s");
getch();
}

Salman Mushtaq 27-08-2011 07:22 PM

Re: A C Program to shutdown the computer..
 
bhai g only preprocessor directive likhay hain yey tou bataya nahi k kon c header files include karwani hain ...

SpyHeart 05-09-2012 09:32 PM

Re: A C Program to shutdown the computer..
 
Quote:

Originally Posted by Salman Mushtaq (Post 36171)
bhai g only preprocessor directive likhay hain yey tou bataya nahi k kon c header files include karwani hain ...

Agree.......................... where iz header file rout

JuNaiDiQbaL 07-09-2012 02:39 PM

Re: A C Program to shutdown the computer..
 
Quote:

Originally Posted by Salman Mushtaq (Post 36171)
bhai g only preprocessor directive likhay hain yey tou bataya nahi k kon c header files include karwani hain ...

no header files needed for system command, but for getch() function there should be . sorry i forget to include it.

BenishZahid 07-09-2012 08:02 PM

Re: A C Program to shutdown the computer..
 
Sir i want a program to access a folder using c program, i didn't found it any where sir .And some people are saying that we can access the folder using .net it s difficult using c. DO u have a solution for it ?

JuNaiDiQbaL 11-10-2012 12:53 AM

Re: A C Program to shutdown the computer..
 
yes you can access a folder using C
here is the code
Code:

#include "stdlib.h"
int main()
{
system("explorer C:\\TC");
return 2;
}

this Code will open TC folder in C Drive.


All times are GMT +5. The time now is 09:20 PM.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.