In a canonical C compiler, you type "cc (program file name).c (return) and it spits out "a.out", which is an executable. Works with the original Kernighan and Ritchie C compiler.
For C++, use the .cpp extension and "g++" for the compiler:
In a terminal window, on MacOS,
'cc (program name).c (return)'
'g++ (program name).cpp (return)'
produces an executable named "a.out", which can be run.
'-o (some file name . extension) will change the output file name.
you cant because computers dont understand C. you need to use a compiler to convert it into a binary.
I think you wanted to ask: how to get an executable file from my C source. The answer is: use a compiler.
If you want to copy C source code to a new file in MS Word, use the following steps:Open the C program in Notepad if it's not already open.Select all text (usually CTRL+A works fine).Copy that text to the clipboard (CTRL+C).Open MS Word (or Wordpad).CTRL+V to paste the C source code.Save if desired.If the C source code is in a file, and you have Windows Explorer open with that file showing, you can open MS Word, and then drag the file from Explorer to MS Word, which will open that file.
When you open a file in write mode, eg. fp=fopen("filename.txt","w"); the content of the file is deleted.
Just double-click the .c file. If associations are setup properly, Visual Studio will launch and open the file. However, it is better to incorporate the .C file into a project file, so that related files and settings will also be retained. In that case, simply double-click the project or workspace file.
edit your autorun.inf file, add the line open=C:\windows\explorer.exe good luck Kevin
Reinstall C or update the C library function . stdio.h must be missing
FILE* file; file = fopen("some-file.dat");
You can open any file with C, since it does not distinguish between file types. It's the way you read from the file.
File/Open
fopen()
If you want to copy C source code to a new file in MS Word, use the following steps:Open the C program in Notepad if it's not already open.Select all text (usually CTRL+A works fine).Copy that text to the clipboard (CTRL+C).Open MS Word (or Wordpad).CTRL+V to paste the C source code.Save if desired.If the C source code is in a file, and you have Windows Explorer open with that file showing, you can open MS Word, and then drag the file from Explorer to MS Word, which will open that file.
When you open a file in write mode, eg. fp=fopen("filename.txt","w"); the content of the file is deleted.
Just double-click the .c file. If associations are setup properly, Visual Studio will launch and open the file. However, it is better to incorporate the .C file into a project file, so that related files and settings will also be retained. In that case, simply double-click the project or workspace file.
1. You (human) want to read an include file: use a text editor. 2. Your program wants to read a file: use open/fopen.
edit your autorun.inf file, add the line open=C:\windows\explorer.exe good luck Kevin
file = fopen("numbers.txt", "r"); this way you can open a file in your working directory. file = fopen("/home/student/numbers.txt", "r"); this way, you can give the path and open a file.but i don't know how search for a file and open it.if someone can help me...
better copy the needed program from your word document and paste it in a notepad and save it with " .c " extension ,now paste this file with ".c" extension to "bin" folder then normally open the turboc file->open and click on the corresponding name with ".c" extension
Reinstall C or update the C library function . stdio.h must be missing