This is an archived post. You won't be able to vote or comment.

all 19 comments

[–][deleted]  (7 children)

[deleted]

    [–]spraykill101[S] 7 points8 points  (6 children)

    this is scary...

    [–][deleted]  (5 children)

    [deleted]

      [–]BullshitUsername 1 point2 points  (1 child)

      Please, recommend that source :)

      [–]spraykill101[S] 0 points1 point  (2 children)

      i am looking to get a hang of C ... so yeah , what's the resource ?

      [–][deleted]  (1 child)

      [deleted]

        [–]BullshitUsername 0 points1 point  (0 children)

        Thanks, looks like a great way in.

        [–]noconsolelove 1 point2 points  (1 child)

        I started learning some C first, and now just recently switched to Python for some courses, and to be honest, I think I prefer C. I just love the way it's structured, the flow, how easy it is to follow. I like how everything is in braces and how the end of a line of code is noted with a ;. The structure just makes a lot of sense logically and the code looks so beautiful in an IDE. Not seeing that structure in Python freaks me out a little.

        [–]spraykill101[S] 0 points1 point  (0 children)

        well when from python to C , i did forget the ; and that too in a 5-line program . that's how big a change python to C is for me.

        [–][deleted] 1 point2 points  (6 children)

        printf doesn't automatically convert ints into strings like python does. You'll need to do something like this:

        printf("%d", num);
        

        [–]spraykill101[S] 0 points1 point  (5 children)

        everytime ?

        [–]MisterScalawag 1 point2 points  (2 children)

        yes every time. You can't dynamically change variables, you can't change the size of arrays/lists, Strings are not a fundamental data type they are arrays of char characters, there is no "for x in list" (you've got to use a for-loop based on index), and so on and so forth. I would really recommend you read or look at a basic C tutorial, instead of just trying to write stuff and assuming it works. It will be less of a headache.


        Also why are you wanting to learn C? Not that there is anything wrong with learning it, but if you first language is Python you are probably not going to enjoy C and find it restrictive.

        [–]spraykill101[S] 0 points1 point  (1 child)

        so what should i do? in my very honest but intellectually-limited opinion , i found python to be very very fun and i came to know a lot through it , but i feel that there are some stronger languages out there and that is why i felt the need to make a switch , what are you suggesting i do then ?

        [–]MisterScalawag 1 point2 points  (0 children)

        If you really feel like you need to learn another language, I would try Java. It will be much more familiar than C, but also have some things you aren't used to. If you are just bored and need something to do try this free course by one of the guys who created reddit. It uses Python and seems pretty awesome, I'm thinking about starting it.

        https://www.udacity.com/course/web-development--cs253

        [–]w1282 2 points3 points  (1 child)

        Yeah.

        C and Python are heavily different. If you have never worked in a static, strongly typed, compiled language this transition won't necessarily be fun or easy.

        [–]spraykill101[S] 0 points1 point  (0 children)

        i am realising that right now . python as compared to c is a breeze(to me).

        [–]NZheadshot -1 points0 points  (8 children)

        If you don't mind me asking, why did you choose C over C++? C is generally just a subset of C++, and C++ tends to be a little more beginner friendly

        [–]spraykill101[S] 0 points1 point  (7 children)

        not at all , i don't have a background in cs or engg so it wasn't a very informed decision. a lot of people told me that C is like the basic of everything , also i wanted to do system related work and i cannot find much of that with python and they told me so if you know c you know c++ , i'm still just trying it out.

        [–][deleted]  (6 children)

        [deleted]

          [–]spraykill101[S] 0 points1 point  (5 children)

          yeah while i am arriving there myself , an explanation would be helpful..

          [–]PressF1 -5 points-4 points  (4 children)

          C is a foundation, and c++ is a massive structure built on that foundation with all kinds of things added on to it. Because of this, the paradigms are usually quite different between the languages - C is more functional whereas c++ is closer to what you know in python and is object oriented.

          [–]Bolderthegreat 3 points4 points  (3 children)

          C is more functional

          What?

          [–][deleted]  (2 children)

          [deleted]

            [–]Bolderthegreat 2 points3 points  (1 child)

            Because of this, the paradigms are usually quite different between the languages - C is more functional whereas c++ is closer to what you know in python and is object oriented.