How to Write and compile C Programs in RedHat Linux Server
Hello guys in this tutorial we are going to learn how to write and Compile C program in RedHat Linux Server.Its a very simple process you just need to following Simple Steps. At Fast we will Install C Compiler in Linux Server. we will install C Compiler through Yum Server. If you don’t have any idea about YUM server so please click and look how to install yum server in Redhat LInux Server.
Step 1 Here i assume that you have configured YUM Server in redhat linux, then you will install C -Compiler through below Commands
[root@localhost ~]# yum install gcc* -y Step 2 then we will write C Program like this
[root@localhost ~]# vim vishnu.c #include<stdio.h> void main() { printf("hello this is my linux server c programming demo'); } ~ :wq
Step 3 then we will compile Program below Commands
[root@localhost ~]# gcc vishnu.c -o cprogramStep 4 now if we don’t found any error in this program then we will run below commands
[root@localhost ~]# ./cprogram hello this is my linux server c programming demo
if you have any Problem in this process please comments here i will solve your problem
Thank you
Vishnu Sharma
