I'm a Newbie, need to know what does this code do(and how to execute it in terminal)
How to exeute a .c file in terminal and what this code do pls.
thnkx for help Code:
#include<stdio.h> |
Hi,
You don't execute a .c file directly in a terminal. You compile it with a c-compiler like gcc or clang to an executable format and execute that. The program you show would create a number of child processes. But if you don't know what the fork() statement does, I would advise you to get a nice beginners book about C and start off with something simple like Code:
#include <stdio.h> |
commands
i need to know the commands to execute the files, i know already that i nee to compile it first, pls the step bby step commands someone?
|
Hi,
There are already a lot of posts on this site that could tell you how, also reading the man-pages could tell you probably how. But basic command to compile is: gcc <inputfiles> -o <executable file> Example: gcc test.c -o test To execute: ./test Cheers, |
All times are GMT -5. The time now is 11:27 AM. |