answersLogoWhite

0


Best Answer

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.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

you cant because computers dont understand C. you need to use a compiler to convert it into a binary.

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

I think you wanted to ask: how to get an executable file from my C source. The answer is: use a compiler.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you open a C file as an executible file?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is a statement use to open data file in c?

FILE* file; file = fopen("some-file.dat");


How many file types are avilable in C?

You can open any file with C, since it does not distinguish between file types. It's the way you read from the file.


How do you load a program in turbo c?

File/Open


How do you open a file in c plus plus?

fopen()


How do you copy c program to msword?

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.


How you can delete the data in the file when you open the file in read or write mode in C programming?

When you open a file in write mode, eg. fp=fopen("filename.txt","w"); the content of the file is deleted.


How do you i open a c page in visual studio 2005?

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.


How do you open include file in c?

1. You (human) want to read an include file: use a text editor. 2. Your program wants to read a file: use open/fopen.


How do you open C when it prompts you to choose the program to open it with with in a list?

edit your autorun.inf file, add the line open=C:\windows\explorer.exe good luck Kevin


How do you set the path for file handling in c?

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...


How do you copy the turbo c screen in Microsoft Word?

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


How remove error unable to open the file stdio.h in c?

Reinstall C or update the C library function . stdio.h must be missing