+ Post a Comment HERE!   + Ask a Question / Post a Topic
Results 1 to 3 of 3

How To Compile A Program In C Language

Advert.

  1. #1
    jatin51
    jatin51 is offline Just in!

    How To Compile A Program In C Language

    Advert.
    Compiling HEYWORLD.C
    Assuming that you have thumbed through it already, use your powerful human memory to
    recall the proper command to compile and link the HEYWORLD.C source code.
    Here’s a hint:
    gcc heyworld.c -o heyworld
    Type that command at your command prompt and see what happens.
    Well?
    Nothing happens! If you have done everything properly, the GCC compiler
    merely creates the final program file for you. The only time you see a message
    that an error occurs in the program.

    Running the final result
    If you used the proper compiling command, the name of the program to run is
    identical to the first part of your source code. So why not run that program!
    In Windows, the command to type is
    heyworld
    In the Unix-like operating systems, you must specify the program’s path or
    location before the program name. Type this command:
    ./heyworld
    Press the Enter key and the program runs, displaying this marvelous text on
    your screen:
    hey world!

    Welcome to C language programming!

  2. #2
    Logique's Avatar
    Logique
    Logique is offline Just in!
    This post dedicated for people, who never ran and never compiled C programs. In this tutorial I will explain how to do it both in *nix operating systems and Windows. However, I recommend you to you Unix in your programming. I assume that your already have a code.

    Unix & Linux

    1. Open “Terminal”. Copy your code. (CTRL +C)

    2. Open text editor and save your file with extension “.c”

    3. Exit text editor

    4. Compile your file (make it executable) using command: cc <filename>

    5. Type in Terminal: ./a.out

    That’s all

    Windows

    1. Download program from: The Dev-C++ Resource Site

    2. Download, Install and run software

    3. Use CTRL +N and copy your code

    4. Save file (File –> Save)

    7. Click on Execute —> Compile

    8. When compiling is done once again go to Execute and click Run

    That’s it!

  3. #3
    Kim786
    Kim786 is offline Just in!
    hey just press Alt+F9 to compile a program in c but you must install the turboc3 in your pc enjoyy

+ Post a Comment HERE!

Similar Topics and Discussions

  1. Hyundai Announces New Program for Santro and i10
    By ArunMalhotra in forum Indian Cars and other light four wheelers forums
  2. Program Of Bubble Sort In C Langauge
    By jatin51 in forum Computer Programming and Designing
  3. Cannot rename folder: It is being used by another person or program
    By Sweetie in forum Computer Software Troubleshooting
  4. Know which program is using your hard drive or accessing it !
    By Ricky in forum Computer & IT Tutorials / Articles
  5. Katrina Kaif’s language problem!
    By jigs in forum Bollywood Buzz

Tags for this Thread

X
Have Question? Ask now free!