Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

That's not a program, that's the source code for a program.

C is a compiled language, meaning it must be "compiled" into machine-readable instructions before you can run it. As you are using C, the "C Compiler" (cc) can do this.

cc -o fork for.c   # compile the code
chmod +x fork      # ensure it it executable
./fork             # run the compiled program

As you move on to more complicated programs, using multiple source files and external libraries, you'll likely move on to using the "GNU Compiler Collection" (gcc) and make to describe how to turn the source code into a working executable.

This questionThis question has various information on the difference between scripts (as you are attempting to treat your source code) and compiled programs.

That's not a program, that's the source code for a program.

C is a compiled language, meaning it must be "compiled" into machine-readable instructions before you can run it. As you are using C, the "C Compiler" (cc) can do this.

cc -o fork for.c   # compile the code
chmod +x fork      # ensure it it executable
./fork             # run the compiled program

As you move on to more complicated programs, using multiple source files and external libraries, you'll likely move on to using the "GNU Compiler Collection" (gcc) and make to describe how to turn the source code into a working executable.

This question has various information on the difference between scripts (as you are attempting to treat your source code) and compiled programs.

That's not a program, that's the source code for a program.

C is a compiled language, meaning it must be "compiled" into machine-readable instructions before you can run it. As you are using C, the "C Compiler" (cc) can do this.

cc -o fork for.c   # compile the code
chmod +x fork      # ensure it it executable
./fork             # run the compiled program

As you move on to more complicated programs, using multiple source files and external libraries, you'll likely move on to using the "GNU Compiler Collection" (gcc) and make to describe how to turn the source code into a working executable.

This question has various information on the difference between scripts (as you are attempting to treat your source code) and compiled programs.

deleted 4 characters in body
Source Link
OrangeDog
  • 1.2k
  • 9
  • 16

That's not a program, that's the source code for a program.

C is a compiled language, meaning it must be "compiled" into machine-readable instructions before you can run it. As you are using C, the "C CompilerCompiler" (cc)" can do this.

cc -o fork for.c   # compile the code
chmod +x fork      # ensure it it executable
./fork             # run the compiled program

As you move on to more complicated programs, using multiple source files and external libraries, you'll likely move on to using the "GNU Compiler CollectionCollection" (gcc)" and "Makefiles"make to describe how to turn the source code into a working executable.

This question has various information on the difference between scripts (as you are attempting to treat your source code) and compiled programs.

That's not a program, that's the source code for a program.

C is a compiled language, meaning it must be "compiled" into machine-readable instructions before you can run it. As you are using C, the "C Compiler (cc)" can do this.

cc -o fork for.c  # compile the code
chmod +x fork      # ensure it it executable
./fork             # run the compiled program

As you move on to more complicated programs, using multiple source files and external libraries, you'll likely move on to using the "GNU Compiler Collection (gcc)" and "Makefiles" to describe how to turn the source code into a working executable.

This question has various information on the difference between scripts (as you are attempting to treat your source code) and compiled programs.

That's not a program, that's the source code for a program.

C is a compiled language, meaning it must be "compiled" into machine-readable instructions before you can run it. As you are using C, the "C Compiler" (cc) can do this.

cc -o fork for.c   # compile the code
chmod +x fork      # ensure it it executable
./fork             # run the compiled program

As you move on to more complicated programs, using multiple source files and external libraries, you'll likely move on to using the "GNU Compiler Collection" (gcc) and make to describe how to turn the source code into a working executable.

This question has various information on the difference between scripts (as you are attempting to treat your source code) and compiled programs.

Source Link
OrangeDog
  • 1.2k
  • 9
  • 16

That's not a program, that's the source code for a program.

C is a compiled language, meaning it must be "compiled" into machine-readable instructions before you can run it. As you are using C, the "C Compiler (cc)" can do this.

cc -o fork for.c  # compile the code
chmod +x fork      # ensure it it executable
./fork             # run the compiled program

As you move on to more complicated programs, using multiple source files and external libraries, you'll likely move on to using the "GNU Compiler Collection (gcc)" and "Makefiles" to describe how to turn the source code into a working executable.

This question has various information on the difference between scripts (as you are attempting to treat your source code) and compiled programs.