Installing C (in Redhat/CentOS/Fedora)
Shell Programming:

How to install gcc (to support c programming)

yum  install  libstd*

yum install *gcc*

 

vim welcome.c

(and type following)

#include<stdio.h>

int  main<>

{

char  name[20];

printf(“Enter your name”);

scanf(“%s”, J name);

printf(“\nYour name is Mr. %s \n”, Jname);

}

 

(save and exit)

 

# gcc welcome.c                (this command compile the welcome.c and as a result a.out file is created.

# ./a.out                               (to run the program)

 

Note: if you compile any new programe, ./a.out will run the new programe not the prev (welcome.c) as you need to compile it once again)

Connect With Us
Instant Query
Your Name :

Email Address :

Message :