Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: A little problem in compiling C code

  1. #11
    Join Date
    Jun 2007
    Location
    Maryland, US
    Beans
    6,288
    Distro
    Kubuntu

    Re: A little problem in compiling C code

    Quote Originally Posted by boazjones View Post
    Sorry guys; but I have a C# ASP.NET question.
    Open a new thread; your question does not belong in this one.

  2. #12
    Join Date
    Jun 2007
    Location
    Maryland, US
    Beans
    6,288
    Distro
    Kubuntu

    Re: Problem compiling a simple .c code

    Quote Originally Posted by gbsmailadd View Post
    Hello forum,
    I am an absolute beginner in ubuntu 12.04 LTS. I have two problems which are as follows:

    01.

    I am having problem getting the output of a C code.
    Welcome to the forums.

    In the future, please open a new thread. It is impolite to hijack another thread to post an unrelated query.

  3. #13
    Join Date
    Jan 2013
    Beans
    3

    Re: Problem compiling a simple .c code

    Quote Originally Posted by Warren Hill View Post

    2. a.out is the default output file name. If you want it to be called something else you have to tell it what. Your command should have been

    gcc -o HelloWorld Hello.c

    then to run it enter

    ./HelloWorld

    In a terminal once you are in the correct directory.

    ------
    Alternativley if you are happy for the program to be called "a.out"

    ./a.out

    should run it
    Thanks. It worked. Is there any other way to get the output directly in the terminal without creating any output file?
    Last edited by gbsmailadd; January 22nd, 2013 at 02:54 PM.

  4. #14
    Join Date
    Jan 2013
    Beans
    3

    Re: Problem compiling a simple .c code

    Welcome to the forums.

    In the future, please open a new thread. It is impolite to hijack another thread to post an unrelated query.
    Ohh! I'll keep that in mind.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •