Like Tree18Likes

To learn C++ or C# should I learn C first ?

This is a discussion on To learn C++ or C# should I learn C first ? within the C Programming forums, part of the General Programming Boards category; I have a few questions about programming languages 1. What are the most popular programming languages ?and why? 2. To ...

  1. #1
    Registered User
    Join Date
    Jan 2013
    Posts
    25

    To learn C++ or C# should I learn C first ?

    I have a few questions about programming languages

    1. What are the most popular programming languages ?and why?
    2. To learn C++ or C# should I learn C ? and if C necessary how much of C knowledge I need basic? intermediate? or advanced ?
    3. What are applications of C++ and C# ?

  2. #2
    Registered User
    Join Date
    May 2009
    Posts
    2,542
    For C++, I see no reason to learn C first.
    I think knowing C is actually making it harder for me to learn C++ correctly.

    I would suggest C# followed by C++, and C last if needed.

    Note: If you really only need one; I suggest learning that one first.

    Edit: I only know C well, the others only slightly.

    Tim S.
    King Mir and amadeus111 like this.
    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the Universe is winning." Rick Cook

  3. #3
    Registered User
    Join Date
    Nov 2012
    Posts
    1,057
    1. There is a group which does a study on this using an index. Check it out here: TIOBE Software: The Coding Standards Company

    2. Consider the practical case. Are you taking a course at a university? Most of them teach C at least. So you should learn it. To me C has a teaching advantage that it's fairly minimalistic, so the distance between basic and advanced is not that great. Much more important is good techniques that apply to any programming language.

    3. Languages like C, C++, C# and Objective-C are so called "native languages" - the languages and tools are purposed to produce code that runs natively in the hardware and not through a VM or interpreter like many other popular languages Java, PHP, Python. Advantage is speed, efficiency. C# tends to be favoured in the Microsoft world, Objective-C in the Apple world. C++ seems to me to be "corporate neutral" of the two.

    In C++ circles it's a fairly big no-no to write so-called "C-style" code in C++, so for this reason I think some people may suggest not learning C as somehow helpful in some kind of goal to write proper C++. But I think a more reasonable way of saying it is to treat them as separate languages. The original idea of C++ was to be compatible with C. The earliest versions were actually compiled with C using a preprocessor. But they each have separate standards which have taken different paths and thus have enough small differences to make them not really the same.

  4. #4
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,675
    How can someone learn programming if he doesn't know what a pointer is?

    I suggest you learning C first.
    amadeus111 and caroundw5h like this.
    Code - functions and small libraries I use


    It’s 2014 and I still use printf() for debugging.


    "Programs must be written for people to read, and only incidentally for machines to execute. " —Harold Abelson

  5. #5
    Registered User
    Join Date
    Feb 2011
    Posts
    52
    1. Very difficult to answer. Each language has its own features and advantages. One programming language might be better than the other depending on the context.
    For example, C is better than any other language when you think of robotics, programming micro-controllers, designing drivers, etc. While VB will provide you with all ease when you consider "window programming".
    2. If you absolutely don't have any knowledge about programming you might consider learning the basics of C(including structures), first.
    3. Application of any language is to design solutions to problems so the applications are vast. Out of many applications, you can say, C++ is used to design games; C# for ASP.NET, etc., etc., etc.
    amadeus111 likes this.

  6. #6
    Registered User
    Join Date
    Nov 2010
    Location
    Long Beach, CA
    Posts
    5,457
    1. Google could answer this for you. Search for TIOBE. Currently C and Java top the list.
    2. No, C is not a prerequisite to either. They just have similar names (a poor decision, IMO, especially C#, which is nothing like C/C++).
    3. Anything you want to do (sort of). C, C++ and C# are all "Turing complete" (as is almost any programming language you would use), meaning they are all equally capable of solving any problem that can be solved with a computer. How easy or elegant the solution is in a given language depends on what the problem you wish to solve is, and how you want/need to solve it. Each language has tasks it's good at and tasks it's not so good at.

    Since you're early in your career, try lots of stuff. Find one (or more) languages you think you like, and start working with them a lot, get good at them. You may find that, as you learn more about that language, you like it less. No biggie, you can switch languages. Computer languages are much easier to learn than human languages, and picking up a second programming language is much easier than picking up the first. You already have all the problem solving skills and are familiar with basic things like branching, looping, functions, etc.

    Most programmers have 1-2 languages they're really good with, and several others they use from time to time. Personally, I'm a C guy, with a side of Python for my quick scripting needs. However, I am able to work in Java, C++, PHP and Perl and JavaScript if I need to, I'm quite comfortable with assembly, and have dabbled in Erlang too. I wish I had stronger OOP and functional programming skills, but I mostly do embedded development, so in many cases, OOP & functional aren't necessary or the right choice, and I don't really need them.
    amadeus111 likes this.

  7. #7
    Registered User
    Join Date
    Nov 2012
    Posts
    1,057
    Quote Originally Posted by anduril462 View Post
    1. Google could answer this for you. Search for TIOBE. Currently C and Java top the list.
    Keep in mind that in the question of C vs C++, C may very well be overrepresented in a text-based search like Google. Consider the following link

    stackoverflow.com/questions/9371238/why-is-reading-lines-from-stdin-much-slower-in-c-than-python

    From the URL, it looks like it is comparing C to Python. In fact, it is about C++. The URL does not allow + symbols inside them, so they are automatically filtered out for "Search Engine Friendliness"

    That being said, I have read in the TIOBE description that they do make note of this and try to account for it in their index.

  8. #8
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,675
    Quote Originally Posted by anduril462 View Post
    Currently C and Java top the list.
    Very true. As a matter of fact, most universities present as first to their students C or Java.
    Code - functions and small libraries I use


    It’s 2014 and I still use printf() for debugging.


    "Programs must be written for people to read, and only incidentally for machines to execute. " —Harold Abelson

  9. #9
    Registered User
    Join Date
    Jan 2013
    Posts
    25
    Thank you guys lots of good information. I have started programming b/c I didnt want to waste my time by playing games. I think creating part of programming more fun and satisfying than playing a game.

  10. #10
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,675
    Create your game and then play it! Feels goood!!!!!!!!!!!!!!!!!
    amadeus111 likes this.
    Code - functions and small libraries I use


    It’s 2014 and I still use printf() for debugging.


    "Programs must be written for people to read, and only incidentally for machines to execute. " —Harold Abelson

  11. #11
    Registered User loserone+_+'s Avatar
    Join Date
    Dec 2012
    Location
    Indonesia
    Posts
    112
    Create your game and then play it! Feels goood!!!!!!!!!!!!!!!!!
    Does a game can be made only using C programming?
    I mean simple game, like DOS game, abandonware game

  12. #12
    Registered User
    Join Date
    Nov 2010
    Location
    Long Beach, CA
    Posts
    5,457
    Quote Originally Posted by loserone+_+ View Post
    Does a game can be made only using C programming?
    I mean simple game, like DOS game, abandonware game
    If you actually read this thread, you would know the answer. You can read through my post #6 to find out. I do not answer your question directly, but it is a very simple inference.

  13. #13
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,675
    Quote Originally Posted by loserone+_+ View Post
    Does a game can be made only using C programming?
    I mean simple game, like DOS game, abandonware game
    I am going to give a direct answer (despite the fact that anduril462 gave an indirect one ).
    I had built reversi (othello) using only C. After building it, it was very nice seeing other programmers lose to my algorithm. Well actually I was losing too, so it was a bit strange, to be beaten by your own self :P . On the other hand, my approach was not the best one.. Well I am starting telling more and that is not appropriate for the topic. For more see here (on the bottom of the page).
    Code - functions and small libraries I use


    It’s 2014 and I still use printf() for debugging.


    "Programs must be written for people to read, and only incidentally for machines to execute. " —Harold Abelson

  14. #14
    Registered User caroundw5h's Avatar
    Join Date
    Oct 2003
    Posts
    751
    Quote Originally Posted by std10093 View Post
    Very true. As a matter of fact, most universities present as first to their students C or Java.
    One of my favorite quotes is by the mathematician Morris Kline He says "When the concrete cases are understood, the abstractions are readily made" I live by this quote and would highly suggest If you really want to code, start with C and for the love of God stay away from JAVA.
    amadeus111 likes this.
    Warning: Opinions subject to change without notice

    The C Library Reference Guide
    Understand the fundamentals
    Then have some more fun

  15. #15
    Registered User
    Join Date
    Apr 2006
    Posts
    2,023
    Quote Originally Posted by stahta01 View Post
    For C++, I see no reason to learn C first.
    I think knowing C is actually making it harder for me to learn C++ correctly.

    I would suggest C# followed by C++, and C last if needed.

    Note: If you really only need one; I suggest learning that one first.

    Edit: I only know C well, the others only slightly.

    Tim S.
    This post has the best advice in the thread, IMO.
    stahta01 likes this.
    It is too clear and so it is hard to see.
    A dunce once searched for fire with a lighted lantern.
    Had he known what fire was,
    He could have cooked his rice much sooner.

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Learn C after C++?
    By swgh in forum C++ Programming
    Replies: 26
    Last Post: 03-02-2006, 07:45 PM
  2. You have to learn C in order to learn C++
    By gandalf_bar in forum A Brief History of Cprogramming.com
    Replies: 20
    Last Post: 07-16-2004, 10:33 AM
  3. What/Where to learn?
    By Cris987 in forum C++ Programming
    Replies: 10
    Last Post: 11-28-2003, 10:32 PM
  4. where can i learn what an API is?
    By Geo-Fry in forum C++ Programming
    Replies: 4
    Last Post: 08-12-2003, 05:30 PM
  5. Do you want to learn..
    By vasanth in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 02-21-2003, 02:00 PM

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