473,830 Members | 2,096 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Learning C

I am sorry if this is an inappropriate place to put this post, if so
please delete it.

I am wondering about a few things. Do you guys recommend learning C as
a second language, as someone who already knows java very well. And
what is the best way to learn C, books, tutorials, or what?

Thanks, any response would be great.

Mar 10 '06 #1
26 2986
"mf*******@gmai l.com" <mf*******@gmai l.com> writes:
I am sorry if this is an inappropriate place to put this post, if so
please delete it.
Well, this is an entirely appropriate place for this post, but if it
had not been, deleting the post would be impossible (once you post to
USENET, it stays there, for the most part. Even "cancelling " a post
you made will may affect some but not all servers).
I am wondering about a few things. Do you guys recommend learning C as
a second language, as someone who already knows java very well. And
what is the best way to learn C, books, tutorials, or what?

Thanks, any response would be great.


I'd be willing to bet that most of the folks on this group began
learning C with a book. Unfortunately, there is a very high ratio of
crappy C books to useful C books. I strongly recommend you buy a copy
of K&R C ("The C Programming Language", by Kernighan and Ritchie, 2nd
edition), written by the actual inventors of C. The C language has
actually changed since then, but the language described there is still
the most portable version of the language, and that book is the most
widely recognized

When you've worked through that, you should probably buy a copy of "C:
A Reference Manual" by Harbison & Steele.

See also http://c-faq.com/resources/books.html, which gives a few
pointers on finding good books on C.

Participating in this newsgroup, or on alt.comp.lang.l earn.c-c++, can
also be /very/ beneficial, /provided/:

1. You thoroughly familiarize yourself with the
rules-of-conduct/posting for the group. This can be accomplished
by reading about 2 weeks' worth of posts before posting
yourself. See what kinds of posts get good responses, and which
get poor ones.

2. You have the humility and good grace to receive constructive
criticisms, both of your code and of any errant behavior on the
group.

HTH,
Micah
Mar 10 '06 #2
Thanks alot for the response, a few minutes after posting I searched
this group and found hundreds of other threads about the same topic. I
apoligize as well for double posting, that was a mistake even though
I'm sure it must look like I tryed to bump my thread.

I wanted as well, to bring forth another concern that I have with
programming in general. Many people say that ACTUALLY PROGRAMMING
real-world programs is the best way to get better. That theory makes
sense, but when I sit down to write a program in java, I often realize
that I have mastered the sytnax and searching and sorting algorithms,
yet I cannot apply this to a real-world program. Are there any books
for C or websites that explain the analytical thinking or other tactics
involved in practical uses of C?

Mar 10 '06 #3
mf*******@gmail .com said:
Are there any books
for C or websites that explain the analytical thinking or other tactics
involved in practical uses of C?


Your best starting point is the book Micah mentioned. It has a bunch of
exercises scattered throughout each chapter. Do them. It's astoundingly
good training for practical C use. As for analytical thinking, you could do
worse than stick around in comp.lang.c - some of the regular contributors
are fine exponents of the art. (See also Knuth's "The Art of Computer
Programming" - all three volumes - and don't be put off by the mathemagical
flavour.)

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Mar 10 '06 #4
I hear it is very important to use a linux machine for c programming,
is this just a common myth or is there any truth there. I have been
considering switching to linux for this reason, but I'm not sure if
it's worth it..?

Mar 10 '06 #5
"mf*******@gmai l.com" wrote:

Thanks alot for the response, a few minutes after posting I searched
this group and found hundreds of other threads about the same topic. I
apoligize as well for double posting, that was a mistake even though
I'm sure it must look like I tryed to bump my thread.

I wanted as well, to bring forth another concern that I have with
programming in general. Many people say that ACTUALLY PROGRAMMING
real-world programs is the best way to get better. That theory makes
sense, but when I sit down to write a program in java, I often realize
that I have mastered the sytnax and searching and sorting algorithms,
yet I cannot apply this to a real-world program. Are there any books
for C or websites that explain the analytical thinking or other tactics
involved in practical uses of C?


Our own Richard Heathfield has published such a book in "C
Unleashed". So have Kernighan & Pike "The Practice of
Programming". One of the best is Wirths "Algorithms + Data
Structures = Programs".

Get in the immediate habit of including adequate context in any
replies. Don't let the fact that you are posting through that
abortion of a usenet interface offered by google faze you. Read my
sig. below, and read the referenced URLs. Google IS NOT usenet.

All usenet articles need to stand by themselves. There is no
guarantee that any particular other article has ever reached, or
ever will reach, the reader. Even if it has, it may have been
deleted, or just be awkward to view. So quote adequately, and snip
quoted material that is irrelevant to your reply. Do not top-post,
your answer belongs after (or intermixed with) the material to
which you reply.

--
"If you want to post a followup via groups.google.c om, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell. org/google/>
Also see <http://www.safalra.com/special/googlegroupsrep ly/>

Mar 10 '06 #6
mb1471 said:
I hear it is very important to use a linux machine for c programming,
is this just a common myth or is there any truth there.
It's a common myth - and like many myths, it has a huge amount of truth
behind it.

C is a portable language. Any box you can find a C compiler (or
cross-compiler) for, you can use for C programming. And if you write your
code carefully, very often the only thing you have to do to get your
program working on a different system is to recompile on the new system.
So, for example, you write your Widgetalyser on a Mac, get it working, copy
it over to a mainframe, recompile, and hey, presto! It works on the
mainframe too. And, one recompile later, it works on Linux too. And maybe
even on your mobile phone or microwave oven. (Er - maybe.)
I have been
considering switching to linux for this reason, but I'm not sure if
it's worth it..?


Oh, it's worth it all right. But perhaps you should put in a couple of years
on a Windows box first, just so that you'll be *really grateful* when you
change over. ;-)

Seriously, I don't like Windows (having used it for many years), I do like
Linux (having used it for a few years), but C doesn't care. You can get
good C compilers for Windows easily enough, legally for free in many cases.
The only thing to watch - er, one of a few things to watch is that you need
to be very firm with your typical Windows development environment. Be sure
to save your files with a .c extension, not a .cpp extension. Typical
Windows compilers will see a .cpp extension as an invitation to use C++
rules instead of C rules when compiling - with, as the saying goes, the
usual hilarious results.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Mar 10 '06 #7
Richard G. Riley wrote:
"mf*******@gmai l.com"posted the following on 2006-03-10:

Thanks alot for the response, a few minutes after posting I searched
this group and found hundreds of other threads about the same topic. I
apoligize as well for double posting, that was a mistake even though
I'm sure it must look like I tryed to bump my thread.

I wanted as well, to bring forth another concern that I have with
programming in general. Many people say that ACTUALLY PROGRAMMING
real-world programs is the best way to get better. That theory makes
sense, but when I sit down to write a program in java, I often realize
that I have mastered the sytnax and searching and sorting algorithms,
yet I cannot apply this to a real-world program. Are there any books
for C or websites that explain the analytical thinking or other tactics
involved in practical uses of C?


One great way is to analyse existing systems. You mentioned moving to
Linux : this is a great idea because you can compile and step through
existing apps with the debugger.


could we keep the platform bigotry down to a dull roar? Windows has
perfectly good debuggers available as well. So if you really want to
(I've never had the urge) you can "step through existing apps".

I've developed serious applications on both Linux and Windows. They are

both perfectly adequate. It is completly possible to develop
applications
on windows. For heavens sake Windows was *written* in C!

<snip>
--
Nick Keighley

Mar 10 '06 #8
On 2006-03-10, Richard Heathfield <in*****@invali d.invalid> wrote:
mb1471 said:
I hear it is very important to use a linux machine for c programming,
is this just a common myth or is there any truth there.


It's a common myth - and like many myths, it has a huge amount of truth
behind it.


You forgot to mention what that truth is.

Linux, as a "unix-like" system, has a great deal of cultural heritage
that is a good "fit" for C, as C was originally developed for UNIX. This
can be useful [it's probably the type of system on which the implement-
ation of the standard functions is going to be most straightforward *],
but also dangerous [a lot of things that aren't really defined by the
standard are going to happen to work the way you'll assume they should]

*Note I wouldn't actually recommend trying to _read_ the glibc source,
though. If you seriously plan on doing that, get a unixy OS other than
linux. Say, FreeBSD. or Mac OSX. or SCO [well, that doesn't come with
source code, but i'm sure its source code is still more readable than
glibc even so]. really, anything.
Mar 10 '06 #9

Richard G. Riley wrote:
"Nick"poste d the following on 2006-03-10:
Richard G. Riley wrote:
"mf*******@gmai l.com"posted the following on 2006-03-10:

> Thanks alot for the response, a few minutes after posting I searched
> this group and found hundreds of other threads about the same topic. I
> apoligize as well for double posting, that was a mistake even though
> I'm sure it must look like I tryed to bump my thread.
>
> I wanted as well, to bring forth another concern that I have with
> programming in general. Many people say that ACTUALLY PROGRAMMING
> real-world programs is the best way to get better. That theory makes
> sense, but when I sit down to write a program in java, I often realize
> that I have mastered the sytnax and searching and sorting algorithms,
> yet I cannot apply this to a real-world program. Are there any books
> for C or websites that explain the analytical thinking or other tactics
> involved in practical uses of C?

One great way is to analyse existing systems. You mentioned moving to
Linux : this is a great idea because you can compile and step through
existing apps with the debugger.


could we keep the platform bigotry down to a dull roar? Windows has
perfectly good debuggers available as well. So if you really want to
(I've never had the urge) you can "step through existing apps".


No you cant. Firstly, I use multiple OSs : windows, OS/2 and Linux so
get away with your attempt to suggest this is an OS war bigotry.

Secondly, what system apps are you aware of in windows which come with
the C source code? Most are in C++ anyway. Most Gnome/Linux system is
in C. The OP was asking about C.


I thought you were implying Linux was better because the *debugger* was

better. I've never stepped through an existing application (that wasn't
broken)
with a debugger. If you say it's a good way to learn C, who am I to
argue.

But it *still* sounds bizzare to me

<snip>
--
Nick Keighley

Mar 10 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2154
by: Ron Stephens | last post by:
The newly rechristened Python Learning Foundation is a web site dedicated to the assistance of people learning the Python programming language. Features include: 1. Daily lists of new and recent Python-related web articles, Sourceforge projects, and Vaults of Parnassus listings. These are generated using Hans Nowak's Python web spider, mygale.py, and are automatically updated each day. (You can visit Han's interesting blog at <a href =...
29
3512
by: Jhon smith | last post by:
Hi,all,I was just wondering if I am likly to have any problems trying to learn C from older books,I have some from the late 80`s,mid/late 90`s. I am using Dev-C++ on the pc windows platform,But I have noticed small differnces in the books such as,int main(),main(void),fprintf,and others,just wondering if these older books are still worth trying to learn from as Im on a very tight budget and can`t really afford any thing else,or are they...
4
2065
by: Christian Blackburn | last post by:
Hi Gang, I saw this for sale online: Microsoft Visual Basic.NET Deluxe Learning Edition Version 2003. I'm wondering is the CD that's bundled with the learning edition just a digitized version of the book or is it an interactive tutorial? Thanks, Christian Blackburn
1
9668
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej and I was wondering if anyone here would be able to give me some tips for young players such as myself, for learning the language. Is this the best Newsgroup for support with JAVA?
7
1591
by: Max | last post by:
On monday I start a semester course in Python (the alternative was Java). I was looking through the course outline and noticed the following: 1) UserDict is used. This is deprecated, right? 2) There is no mention of list comprehensions, but map and filter are taught early and then revisited later. I don't think this is good: list comprehensions are, IMO, one of Python's great features, Psyco prefers them, they're more pythonic, and map...
36
2553
by: utab | last post by:
Dear, I have experince in C( numerical projects, like engineering problems, scientific applications) I have the basic notion of C++ also, I have read Accelerated C++ until Chapter 7, however it seems that it discusses the std and the other part of the language with your own abstractions. Is that better to read a book first on the basic concepts of C++ language (but not the C part) that gives the basics as if the reader is a beginner...
2
1256
by: bokiteam | last post by:
Hi All, Here is my idea to save learning time - Personal learning book. What we really need is somebody really familiar our learning experience, and then takes the example to teach us. Save the learning time. For example, a person David who understands JAVA, VB, C programming, he doesn't want to pay too much time to study a C# programming book. If
78
4222
by: arnuld | last post by:
hai all, i am standing on a "crossroad to C++". I am here in front of you as i have a problem. i will be brief. Please do not think: "arnuld is sick", i am really struggling & doing hard-work to become a Modern C++ Programmer & i am feeling as if i am standing on a crossroad. i am asking because every time i made a decision on my own, in my past, i always ran into huge wastage of time, money & effort. that is why i am posting it here:
0
1565
by: LK~ICT | last post by:
Sri Lanka rural e-learning project seeks corporate support Dec 04, 2007 (LBO) - A Sri Lankan e-learning initiative for rural students is seeking corporate sector support to expand and cover 400 computer centers around the island, its designers said. The Shilpa Sayura project initiated by eFusion, a local software company, is a learning tool for rural students who do not have the necessary number of teachers and lack resources to...
16
1772
by: John Salerno | last post by:
Just something that crosses my mind every time I delve into "Learning Python" each night. Does anyone see any value in learning Python when you don't need to for school, work, or any other reason? I mean, sure, there's value in learning anything at any time, but for something like a programming language, I can't help but feel that I will be mostly unable to use what I learn simply because I have no reason to use it. The *process* of...
0
9642
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10487
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10525
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9313
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5617
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5780
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4411
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3958
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3076
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.