top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to set up a local environment of C programming on Linux Machine?

+1 vote
513 views

I am a newbie and using fedora machine, please help with point by point C programming setup.

posted Aug 11, 2015 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

+1 vote
 
Best answer

Almost all the Linux machine is comes with gcc package installed.
Either you are using Fedor, Ubuntu, CentOs, Mint, etc.

So basically you don't have to do anything apart from checking is your machine has gcc package or not.
If not then install it using below command.
For Fedora:
yum install gcc
For Ubuntu:
apt-get install gcc

Remember you have to use the above as supper user.

After installing cerate a .c file write your code.
compile it with gcc filename.c

For more option of gcc try to see the manual page of gcc using "man gcc"

answer Aug 12, 2015 by Arshad Khan
+1 vote

Check if gcc is already installed as follows

$ gcc -v

You will get something like

Using built-in specs.
Target: xxx
Configured with: xxx
Thread model: posix
gcc version xxx

If GCC is not installed, then you will have to install from http://gcc.gnu.org/install/

answer Aug 11, 2015 by Salil Agrawal
Similar Questions
+2 votes

Please share a sample program with detail code.

+1 vote

How to solve UDP packet drop issues between different internal processes in Linux environment ?

+4 votes

"Given an array of strings, find the string which is made up of maximum number of other strings contained in the same array. e.g. “rat”, ”cat”, “abc”, “xyz”, “abcxyz”, “ratcatabc”, “xyzcatratabc” Answer: “xyzcatratabc”

0 votes

Can anyone help me with a C program to design a simple state machine by using macros?

Requirement
S1,S2,S3,S4 are the states and E1, E2,E3,E4,E5,E6,E7,E8 are events ...

when states moving from one state to another respective event should trigger
s1 to s2 ------> E1
s2 to s3 ------> E2
s3 to s4 ------> E3
s4 to s1 ------> E4
s1 to s4 ------> E5
s4 to s3 ------> E6
s3 to s2 ------> E7
s2 to s1 ------> E8

Please share the C program

...