Where is the output ofter the compilation?

Discussion in 'Programming/Scripts' started by full_adder, Mar 11, 2007.

  1. full_adder

    full_adder New Member


    I have written a samle C program, named T1.c :
    int main(){
    return 0;

    and Isaved it in a special directory named Testing in / Desktop/Testing.
    then I comiled with:

    [[email protected] Testing]# cc T1.c
    [[email protected] Testing]# ls
    a.out T1.c

    Now, how can I see the output, which is : Hello...

  2. martinfst

    martinfst ISPConfig Developer ISPConfig Developer

    cc default output is a.out. So you need to execute a.out. You'd have to do two commands
    chmod +x a.out
    , but I'm not 100% sure the 1st one is needed. It's used to give execute permissions to a file. You can check if they already exists with
    ls -l a.out
    If you see 'x' in the beginning of the line, it's already oke.
  3. full_adder

    full_adder New Member

    Many thanks for your help.

Share This Page