Hi,
This post will make you to learn how to run a sample program in LINUX platform.
You may use any kind of LINUX operating system (i.e.) RED-HAT , UBUNTU , FEDORA , etc,.
You don't need to install C application in LINUX operating system because it would have been already installed at the time of OS installation.
1. Open a text editor, for an example gedit .
2. Type the sample code to check whether the C application works correctly.
CODE:
#include<stdio.h>
int main()
{
printf();
return 0;
}
4. Save the file in the root directory with the extension .c
5. For compiling and running a C-Program open the terminal.
6. Type the command in terminal to compile and run.
COMPILE:
cc source_file_name.c
RUN:
./a.out
This post will make you to learn how to run a sample program in LINUX platform.
You may use any kind of LINUX operating system (i.e.) RED-HAT , UBUNTU , FEDORA , etc,.
You don't need to install C application in LINUX operating system because it would have been already installed at the time of OS installation.
1. Open a text editor, for an example gedit .
2. Type the sample code to check whether the C application works correctly.
CODE:
#include<stdio.h>
int main()
{
printf();
return 0;
}
4. Save the file in the root directory with the extension .c
5. For compiling and running a C-Program open the terminal.
6. Type the command in terminal to compile and run.
COMPILE:
cc source_file_name.c
RUN:
./a.out
0 comments:
Post a Comment