Usefulness of C?

This is a discussion on Usefulness of C? within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Well I started out with the intention of learning C++ with zero programming experience, besides Basic, which doesn't really count. ...

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    1

    Usefulness of C?

    Well I started out with the intention of learning C++ with zero programming experience, besides Basic, which doesn't really count.

    But I had trouble finding a book that gave me an acceptable background, so I thought I would start with C instead. The book I am using is "Beginning C" by Ivor Horton. Except for the typos (which is OK with me, because if I can identify the typos in code, then that means I understand the material, right?) I think the pace of the book is good for beginners like me.

    My question is, is learning C even useful anymore, or am I wasting my time that would be better spent on a C++ book for beginners?

    My goal here was to start with C++ and then eventually move on to windows (java, VB, etc). Its cool stuff and I wish I would have started learning this a long time ago, but am I wasting my time with C?

  2. #2
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,266
    This question probably ranks up there with "What is the meaning of life?" as the questions most asked to death. C'mon, you type a summary of your question into the Google textbox, click "Search" and receive as many opinions as you like.

    As for mine, I started with C, and I like it. As a result, I view C++ as somewhat of a bastardization of C to meet what must've been a vague specification (It probably had "MUST BE OBJECT-ORIENTED!!111!!" written across it in big letters), but it does the job, the job being teh encapsulation of a large process into smaller building blocks that talk to each other. You can write C and compile it as C++ (attaching typecasts as necessary) and it will work fine. You can essentially do what C++ classes do in C, the only problem being that your code is likely to become somewhat unruly and difficult to understand.

    On the plus side, C is more easily used in embedded programming (getting your own little CPU and welding it to your PCB with some memory chips and having fun), C++ isn't because its runtime memory footprint is larger (if you include exception handling).

    Some people who get waaaay down into C find it hard to write in such a way as to make C++ useful to them, a bit like how hard it is to quit smoking. Try to avoid that if you can.

  3. #3
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,762
    There was a thread earlier that turned into a discussion like this one. You will find that programmer's opinions on C can very. I use it because it's easier for me to understand, which sounds weird to lots of people. Other programmers will point out that C is most useful in embedded environments where resources like memory are sparse, and that for the most part C programmers will spend time coding things so they can get C++ functionality out of a C program.

    Is it a crime for you to learn C first? Nope. Go ahead, it will help you understand certain things about C++ better, in my opinion, by giving you a more terse language to understand. C++ is powerful, excellent, but it does confuse certain things for new programmers, like pointers and runtime memory. Most talented people are able to just learn C++ from the beginning and get better at it every day.

    Also, some programming books are better than others. Read reviews carefully and make a choice. A bad book willmake a bad programmer.

  4. #4
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >My question is, is learning C even useful anymore
    The people who pay me to use C think it's useful. Who am I to argue?
    My best code is written with the delete key.

  5. #5
    unleashed alphaoide's Avatar
    Join Date
    Sep 2003
    Posts
    696
    Well, what's the point of learning any programming language at all? To get you a job? Then learn the languages required for that specific job.

    C and C++, even though you're not gonna be using them, give you lots of added value because those pretty much most popular languages out there are based off C/C++. A game programmer may just use available game engine, but it's better if he knows how to make one. A C#/Java programmer may program only in C#/Java, but knowing C/C++ as well, will give you better understanding how your program works, which could be useful somewhat.
    source: compsci textbooks, cboard.cprogramming.com, world wide web, common sense

  6. #6
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    Personally, I would say learn C++, but like others have said, C is useful too. Just don't look at C as a stepping stone to get to C++.
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

  7. #7
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    your OS is likely written in C. do you find that useful?
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  8. #8
    ... kermit's Avatar
    Join Date
    Jan 2003
    Posts
    1,528
    Quote Originally Posted by major_small
    your OS is likely written in C. do you find that useful?
    Well, only for certain things. Not so good for driving 3 1/4" nails.....

  9. #9
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,006
    Quote Originally Posted by kermit
    Well, only for certain things. Not so good for driving 3 1/4" nails.....
    Couldn't resist:
    If the only tool you have is a hammer, then everything looks like a nail.
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  10. #10
    ... kermit's Avatar
    Join Date
    Jan 2003
    Posts
    1,528
    Touche..

  11. #11
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    If the only tool you have is a hammer, then all your problems are solved.
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  12. #12
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,267
    of all the languages i've played with C is overall the best... its simple complete and concise and powerful... makes things plain an easy... its only as difficult as you make it.
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

  13. #13
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,262
    I think it is great, and usefull.

  14. #14
    User
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    498
    I think it's good to know both languges. I use them interchangabley; for example when I'm learning new code, I use C to keep everything as simple as possible.

    Then when I want to write a serious program, I use C++ to keep my code more structured and organized, and to make the code shorter.

  15. #15
    They Call me Mister Sako
    Join Date
    Jul 2004
    Posts
    169
    i learned C while learning C++. c and c++ are so closely related youll pretty much learn one while learning the other, actualy almost all programming languages are very much the same once you learn one you can pretty much do them all. of course theres limitation differences and syntax differences but al the logic is the same and theres an equavalent function for almost everything across languages.

    my approach in your position is to not worry about C but if the time comes that you need it it woudlnt hurt. but thats just how i work because i only get into new languages if im trying to write something that requires use of the language.
    AIM: MisterSako | MSN: sakotheinsane@hotmail.com | E-mail: klinerr1@nc.rr.com
    The goal of computer science is to be lazy

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Usefulness of the "else if" statement
    By gn17 in forum C Programming
    Replies: 7
    Last Post: 08-12-2007, 06:19 AM
  2. Blender: The usefulness of
    By lightatdawn in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 11-07-2001, 10:28 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21