C programming Newbee

  • Thread starter Kanthi Kiran Narisetti
  • Start date
K

Kanthi Kiran Narisetti

Hi ALL,

I am new to C and programming . I need suggestions for the IDE to be
used as a begginer and should I start on Windows or Linux ??

I am also looking for resources for C programming on Internet with
examples on each concept.

I appreciate if any one can help me in this regard.

Kanthi Kiran.
 
N

not

Hi ALL,

I am new to C and programming .

Probably the easiest C implementation to learn on is Pelles C. It's a much
modified version of LCC with C99 extensions. Supports both Win32 and WinCE.
The IDE is very powerful, making it an easy way to get started.

www.smorgasbordet.com/pellesc

As for learning the language. There are tons of tutorials on the web. Try a
Google search for "C programming tutorial" and you'll get lots of returns.

If you want to pick up a book, grab a copy of "Teach Yourself C in 21 Days",
available from most bookstores that carry programming manuals.

http://www.amazon.com/exec/obidos/t...103-2544525-6775031?v=glance&s=books&n=507846

(note: Don't confuse C with C++ ... C++ is a superset of C that uses more
complex (read: "confusing") programming concepts; something you probably
shouldn't tackle until you are comfortable in C first.)
 
M

Mark McIntyre

Hi ALL,

I am new to C and programming . I need suggestions for the IDE to be
used as a begginer and should I start on Windows or Linux ??

Doesn't matter what OS - you choose the one that works best for you in other
ways. If you plan to graduate into programming professionally, you'll probably
need to do GUI programming for both.

As for the GUI, MS, Borland and probably a few others have free/cheap downloads
of either old or beta versions of their compiler toolsets, and there's at least
one free IDE available for windows. A google search should show them up.
 
C

Chris Hills

Hi ALL,

I am new to C and programming . I need suggestions for the IDE to be
used as a begginer and should I start on Windows or Linux ??


Why do you want to learn to program?
Why C?

This should answer the question as to which platform and partly which
IDE. Maybe even which compiler.




/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/\
/\/\/ (e-mail address removed) www.phaedsys.org \/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
 
B

beliavsky

(note: Don't confuse C with C++ ... C++ is a superset of C that uses more
complex (read: "confusing") programming concepts; something you probably
shouldn't tackle until you are comfortable in C first.)

I think C++ may be easier to learn than C if one uses the Standard
Template Library. For example, the C++ vector is easier to use and
safer (out-of-bounds errors are caught) than the C/C++ array. One can
get more done in C++ than C without using "complex programming
concepts" such as pointers. There is a trend in C++ books to use the
STL early, for example in the books "C++ Primer" and "Accelerated C++".

Maybe we both agree that the basics of procedural programming -- loops,
if statements, functions should be mastered before tackling
object-oriented programming.
 
E

Erik de Castro Lopo

I think C++ may be easier to learn than C if one uses the Standard
Template Library.

Sorry, but I think thats one of the worst pieces of advice I
have ever seen on usenet (which I have been reading regularly
since 1991).
For example, the C++ vector is easier to use and
safer (out-of-bounds errors are caught) than the C/C++ array.

The STL related error messages produced by all the C++
compilers I have ever seen are simply atrocious. C++ is
also the most complex, baroque and least forgiving
programming language in existence.

The other poster didn't state whether he already programmed
in other langugages or whether C was going to be his first.

If he is looking for a first lagunage C++ is an especially
bad choice in comparison to Java, Python and even C.

If the original poster already knows another language it
probablt is Java or C++ and he is looking to learn C.

Erik
 
K

Kanthi Kiran Narisetti

Hi,

I an Windows Systems administrator (wanting to migrate to Linux
Administration) with little or no knowledge on programming. I want to
learn a programming language like C to learn the concepts of
programming and then switch to Prog Lang which suits my job like Perl .
As i have done C upto basic level in the past in my academics i felt i
should start with C which would be easy and i can pick up fast.

What i am looking is for now is a good online resources for C with
examples for easy and fast understanding or any tutorials with
examples.

I wanted to start of with Linux Programming with examples as it had
good reviews on net but this book is not available at my place :-(

Thank You..
Kanthi
 
P

pepsikolanut

Hi

I don't know of any good online resource, but "Schaum's Outline of
Programming with C" is a good book. It's like 10 bucs. thin, concise
and to the point.

As far as an ide goes, I think you should stick with something simple
(maybe even notepad?). Fancy ides will only distract you with features
that you'll never use at this level.
 
N

not

Maybe we both agree that the basics of procedural programming -- loops,
if statements, functions should be mastered before tackling
object-oriented programming.

I don't think OOP is not the panacea it's made out to be. CPUs are not
object oriented devices. They are runaway trains that are going to keep
going in a straight line unless we grab control and steer them otherwise.
They do instruction N then N+1 then N+2... that's linear execution, not at
all unlike the original BASIC or Assembler concepts that started with punch
cards and paper tape to eventually grew into the PC as it is today.

In order to gain the best understanding of programming and what it does to
the hardware you want as little obfuscation and abstraction as possible. To
best understand the relationship between outcome, hardware and code, you
want a language that reflects the behaviour of the CPU and the assorted
devices it governs. You want to learn how to talk to the computer on it's
own level; as a friend, not as a distant "voice from above" with no real
knowledge of your audience. Ideally this should point you at Assembler but
I honestly wouldn't wish that on my worst enemy as a first language; talk
about yer vertical learning curves!

So a middle ground is taken between impossible learning curves and solid
understanding of what code does to hardware and data... and that generally
means a procedural language like C or one of the non-oop Pascals.

Once one has a good grounding in the relationship between software, hardware
and results, there's no harm in branching out into newer and more complex
paradigms; in fact, it should be encouraged. But not before one has at
least a reasonable understanding of the underlying behaviour. We do tend to
forget that getting from OOP's lofty concepts to the CPU still has to, of
necessity, invoke a procedural layer between.

[grin] There is a reason why so many Object Oriented Languages have been
prototyped in C...

I think we can agree that the best first step is to get the basics...
variables, pointers, structures, loops, functions and calculations. I don't
think we agree the best source of that education lies in a complex, abstract
environment like C++, C# or Delphi.
 
B

beliavsky

pepsikolanut wrote:

As far as an ide goes, I think you should stick with something simple
(maybe even notepad?). Fancy ides will only distract you with features
that you'll never use at this level.

I don't like fancy IDEs either, but the syntax coloring and smart
indenting of text editors such as Emacs or XEmacs (both free) is very
helpful, especially when there are modes for many different programming
languages (so one does not need to learn a separate editor for each
language), including C. Notepad was not designed as a programming
editor and does not have these features, I believe, so I would not
recommend it for writing code.
 
M

Mark F. Haigh

Kanthi said:
Hi,

I an Windows Systems administrator (wanting to migrate to Linux
Administration) with little or no knowledge on programming. I want to
learn a programming language like C to learn the concepts of
programming and then switch to Prog Lang which suits my job like Perl
<snip>

I suggest you forget about C for the time being. Get an HP TestDrive
account, and write shell scripts on different Unix platforms for the
next 3 months. Play around with awk, sed, grep and friends.

After that, spend a year or two on Perl. Carefully read "Programming
Perl", and complete several ambitios real-world projects using Perl.
Tirelessly refactor and revisit your code. Attempt to master Perl.

Later on down the road, if you find that you still want to learn C,
then your experience with the Unix environment and your general
programming experience is going to make life much easier for you.

Feel free to ignore my advice. If you do, though, remember to read the
FAQ before posting your questions.


Mark F. Haigh
(e-mail address removed)
 
E

Erik de Castro Lopo

Kanthi said:
Hi,

I an Windows Systems administrator (wanting to migrate to Linux
Administration) with little or no knowledge on programming. I want to
learn a programming language like C to learn the concepts of
programming and then switch to Prog Lang which suits my job like Perl .

OK, now we know what you want.

If you eventually want to switch to Perl, why learn C first?
Quite honestly, it doesn't make all that much sense to learn
C as a first programming language.

And if you are thinking of Perl, why not try Python instead?
Python fulfils many of the same roles as Perl but is far more
readable and easier for beginners.

Erik
--
+-----------------------------------------------------------+
Erik de Castro Lopo (e-mail address removed) (Yes it's valid)
+-----------------------------------------------------------+
Microsoft is finally bringing all of its Windows operating system families
under one roof. It will combine all of the features of CE, stability and
support of ME and the speed of NT.
It will be called Windows CEMENT...
 
J

Joona I Palaste

(e-mail address removed) scribbled the following:
(note: Don't confuse C with C++ ... C++ is a superset of C that uses more
complex (read: "confusing") programming concepts; something you probably
shouldn't tackle until you are comfortable in C first.)

Sorry, but C++ was never a superset of C. They are two separate
languages sharing a common, quite large, subset. But there are some C
features that don't work in C++.
 
M

Malcolm

Kanthi Kiran Narisetti said:
I am new to C and programming . I need suggestions for the IDE to be
used as a begginer and should I start on Windows or Linux ??
You won't normally have a choice which OS to program under. If the company
decides that the target market is Windows users, then its no use saying that
you prefer Linux. So you've got to be prepared to use whatever you have.Having said that, as a total newbie you will be writing command-line
programs and it doesn't really matter what you run under. However fairly
soon most people want a bit of graphical output. This isn't easy, since both
Windows and X-Windows are pretty unfriendly.
A lot of people want the functions
Window * openwindow(int width, int height)
closewindow(Window *win)
drawpixel(Window *win, int x, int y, unsigned char r, unsigned char g,
unsigned char b)

and pretty much just that. However implementing these functions on either
Windows or Linux is a pain, for various reasons.
 
M

Malcolm

Erik de Castro Lopo said:
If you eventually want to switch to Perl, why learn C first?
Quite honestly, it doesn't make all that much sense to learn
C as a first programming language.
I disagree here. It's a bit like saying "you want to be a doctor, so why
bother with physics, maths, chemistry and biology first?".

C is a low-level language, and Perl interpreters, for instance, are written
in C. So if you want to understand your tools it's a good idea to start with
a little assembler, then go onto C, and finally try higher-level languages,
which admittedly are often better than C for specific purposes.
 
M

Mark F. Haigh

Malcolm said:
I disagree here. It's a bit like saying "you want to be a doctor, so why
bother with physics, maths, chemistry and biology first?".

Being fluent in Perl and the Unix environment is akin to being an EMT
(emergency medical technician), but with no knowledge of math or
physics.

Like it or not, you don't want a mathematician, physicist, chemist, or
biologist when you're having a heart attack. You want an EMT. Someone
who can get the job done.

For the job of Unix system administration, knowledge of Perl and Unix
tools are akin to being an EMT. If you want to become a brain surgeon
(kernel / tools hacking), learn C. But you can learn brain surgery
later. And also note that being a brain surgeon without knowing how to
be an EMT sounds silly, now doesn't it?
C is a low-level language, and Perl interpreters, for instance, are written
in C. So if you want to understand your tools

<snip>

If you want to understand your tools, then work at trying to understand
your tools. C can help you understand the implementation details of
your tools, but implementation details change more often than the tools
themselves.

it's a good idea to start with
a little assembler, then go onto C, and finally try higher-level languages,
which admittedly are often better than C for specific purposes.

A programmer with several notches in his belt can pick up an assembly
language book and understand it. Give the same book to a green
programmer and you have more questions than answers. For most people,
assembly is not necessary. For many people, C is not necessary.


Mark F. Haigh
 
K

Kanthi Kiran Narisetti

Malcolm said:
I disagree here. It's a bit like saying "you want to be a doctor, so why
bother with physics, maths, chemistry and biology first?".

C is a low-level language, and Perl interpreters, for instance, are written
in C. So if you want to understand your tools it's a good idea to start with
a little assembler, then go onto C, and finally try higher-level languages,
which admittedly are often better than C for specific purposes.

Hi Eric & Malcom,

Can you clarify me as Systems Administrator(Linux & WIndows) which
would be the best choice for begginers programming language C or Perl
or Python . First I want to learn the concepts of programming than
learning a specific language, then I would prefer working on
specialisation or Perfection in Higher Languages.

Thank You.
Kanthi
 
M

Michael Mair

Malcolm said:
You won't normally have a choice which OS to program under. If the company
decides that the target market is Windows users, then its no use saying that
you prefer Linux. So you've got to be prepared to use whatever you have.

Having said that, as a total newbie you will be writing command-line
programs and it doesn't really matter what you run under. However fairly
soon most people want a bit of graphical output. This isn't easy, since both
Windows and X-Windows are pretty unfriendly.
A lot of people want the functions
Window * openwindow(int width, int height)
closewindow(Window *win)
drawpixel(Window *win, int x, int y, unsigned char r, unsigned char g,
unsigned char b)

and pretty much just that. However implementing these functions on either
Windows or Linux is a pain, for various reasons.

Yeah, makes one miss the good old Amiga :)


Cheers
Michael
 
M

Michael Mair

Kanthi said:
Can you clarify me as Systems Administrator(Linux & WIndows) which
would be the best choice for begginers programming language C or Perl
or Python . First I want to learn the concepts of programming than
learning a specific language, then I would prefer working on
specialisation or Perfection in Higher Languages.

The thing is that programming is a craft (even though you can make
an art or science of it but that's the same with every craft).
Learning a craft needs much and regular exercise.
If you learn with a programming language you can use in your daily
work and if you actually use it as soon as you can then you have
a better chance of getting the necessary exercise than if you only
play around a couple of hours per week far from real applications.

That said and even though I know that many people think differently,
I can recommend C as a first language. If you value conceptual
clarity, then it is certainly in some sense better for you than
perl where people without previous experiences in other languages
are somewhat challenged to find a clean and consistent programming
style. I have never had a real look at Python but have heard that
it is in this respect better than perl, so it may well be a good
choice as a starting language.
perl and Python both certainly enable you to get things done in your
job earlier, so that you get motivated earlier by some sort of
"return of investment".
Before the perl lovers beat me up as perl ranks last as a good
beginners' language in this comparison: In perl, you can pick up
many bad habits and get away with it. It is hard to unlearn these
habits later. C is much less forgiving which is IMO a good thing.
Nonetheless, if I want to Get Things Done, perl is often my first
choice.

As for learning C: I recommend the K&R2 book and, as soon as you
feel confident to tackle real world problems (after some months),
"C Unleashed".
After that proceed with whatever tutorials and books you want to
or have to read.


Cheers
Michael
 
M

Mark F. Haigh

Kanthi Kiran Narisetti wrote:

Can you clarify me as Systems Administrator(Linux & WIndows) which
would be the best choice for begginers programming language C or Perl
or Python . First I want to learn the concepts of programming than
learning a specific language, then I would prefer working on
specialisation or Perfection in Higher Languages.

[OT]

If you were a CS student, I'd say learn Python. But since you want to
be a Unix sysadmin, learn Perl. Perl's syntax and heritage is very
Unixy, very loose, integrates well with the most popular web server on
Earth, and directly inherits from C, sh, and awk. Python is stricter,
more of an OOP breed, and more isolated, linguistically speaking.

Back on topic: it doesn't matter. Pick Perl or Python. C is probably
not what you want. Again, feel free to ignore my advice and learn C
anyways, it's a great language and my personal favorite. But do
understand that as a newbie, it's probably going to take you at least
several painful years before you get up to speed.


Mark F. Haigh
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top