Saturday, 22 June 2013

c program coding

   C program to open files in pc

this is a program to open notepad.exe in your desktop you can change the file names to open any files by specifying the correct path and following the same codes..........

c program is the easiest of all programming but just learning to add numbers or matrices has no use because a calculator can even do that.

the main utility of this language is to build a software and even can be used to build up games and viruses.

science can be use for destruction as well as for helping the people and i dont go for destruction so i am not going to post anything about making virus with c language to harm pc or any other systems.

this program opens the notepad

   #include<stdio.h>
             #include<conio.h>
             #include<stdlib.h>
               #include<process.h>
             int main()
             {
                system("C:\\windows\\notepad.exe");
                getch();
             }

 <process.h> is a predefined library  header file used with <stdlib.h> to interface the program with the files stored in pc. 

we can use this code method to make more complex program to run different files and work on them.......

the program is written in dev c++ if you write it in turboc++ then instead of int main() use void main()

for any further assistance or query or suggestions  your comments are invited. 

No comments:

Post a Comment

About the author

Scholar Ratan pal singh is a Google scholar, a man with innovative ideas and a nothing is impossible attitude, is a tech-lover.
He works as a independent researcher and freelance website and software developer.
Member of IEEE comsoc society, Green technology society and has published research paper and codes in many international journals and opensource.

"Failure is the pillar of success and Honesty with oneself is the only true way of achieving self-confidence."

Translate

Pageviews