Wednesday 9 September 2015

Howto see output of C program in Linux or UNIX

Syntax
gcc -o output-file program.c

Task: Compile program

To compile type the command:
$ gcc test.c


Task: Execute program to see output

Above command will create a file called a.out. To see output of test.c program type:
$ ./a.out

Task: Compile to specific executable file

You can specify an execuable file name while compiling program itself:
$ gcc -o test test.c
Now execute test (see output of test.c)
$ ./test


 - By  http://www.cyberciti.biz

1 comment:

  1. That is why selling advertising campaigns marketing so that you could invaluable explore previous advertisment. Quite simply to jot down stronger set that fit this description. Visiting Card

    ReplyDelete

Thank You!!!

create and activate a Python virtual environment on macOS and Windows

create and activate a Python virtual environment on macOS and Windows: Prerequisites: Python 3: Ensure you have Python 3 installed. You ca...