Solved

writing a c programme  in  a  unix  environment

Posted on 1998-10-14
3
210 Views
Last Modified: 2010-04-15
I just  started programming in C and  I need to  write a  C   programme
in  Unix.   How do I start?
0
Comment
Question by:naturalmystic
3 Comments
 
LVL 2

Expert Comment

by:shchuka
ID: 1253525
You should use any text editor to write the source code, e.g. vi, emacs, pico, or anything else.  I personally recommend emacs.  If you're working on a workstation, it has C syntax coloring and it will automatically match parenthes (all kinds: (), [], {}). Start it by typing at the command prompt:
    emacs filename.c
After you've created the file, compile it using gcc or cc or whatever compiler is available on your system:
    gcc -o outputfilename filename.c

This is the simplest thing you would do.  Of course, if you're working on a large project, you'll have a make file to compile the sources and also you'll probably use some flags to pass to the compiler.  From you question, I believe you are just starting working with C, so my answer should be enough to get you started.
0
 
LVL 2

Accepted Solution

by:
kellyjj earned 50 total points
ID: 1253526
Are you new to C??  If so I would get some books to  get you started.  There are pleanty good books out there.  Then just start doing the excercises in the books.   Also I would get a book dealing with unix.


0
 

Author Comment

by:naturalmystic
ID: 1253527
Thanks kellyjj for attempting an answer but I found schuka's comment more helpful.THANKS  A LOT SCHUKA.WHAT BOOKS ARE YOU TALKING  ABOUT KELLYJJ?
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now