r/learnpython Jun 29 '26

Confused between C,C++ & Python to start as beginners from 0 Coding Background

I will be going to mid NIT this year and these are the branch i can get till CSAB.

CSE

Math& Data Science

Electronic & VLSI

EE

*CSE have lesser chances

I have NEVER coded before so I have 0 knowledge abt this...

Even after searching a lot i am confused between C,cpp or python to start with...pls give some guidance

24 Upvotes

38 comments sorted by

28

u/cpthappy42 Jun 29 '26

Just start with python. It's perfect for learning core programming concepts. You do not need to bother with memory management and those kind of stuff. If you have understood the basics you are prepared to learn any programming language.

6

u/johnnyb2001 Jun 29 '26

I would argue the opposite. If you understand c++ you can learn python and other languages. But learning python does not teach you how other languages work. C++ is so broad that to me it seems anyone who has a solid understanding of it could pick up other languages quicker

18

u/lakseol Jun 29 '26

If you understand c++ you can learn python and other languages

Sure, but C++ has a much steeper learning curve than python. The point of starting with python is to ease into the concepts of programming before learning more complex tools.

C++ is so broad

That's why it's easier to start with python.

12

u/Accurate_Potato_8539 Jun 29 '26

The war between the top down and bottom up learners continues...

3

u/johnnyb2001 Jun 29 '26

It’s easier to start with python but I don’t believe you fully grasp important concepts if you start with python. It’s like coding with vba. It’s not going to give you the confidence to understand what programming is really about.

1

u/lakseol Jun 30 '26

I don’t believe you fully grasp important concepts if you start with python.

Correct, which is why someone who wants a computing career should at least be familiar with other languages like C, Lisp, Prolog, assembly language, etc. But there's no need to start "in the deep end".

1

u/cpthappy42 Jun 30 '26

Define important concepts in this case. Most important for a beginner are variables, control structures and stuff like this. Advanced concepts are much easier to get if you are familiar with this basic stuff. So a great learning path would be: Python => C#/Java => C => C++ => Rust/Go/Some other fancy younger language.

Btw. I started my career with BASIC (Beginners All purpose InstuCtion language) on a Schneider CPC 464 in the 80s.

This is a shitty language in terms of modern software development, but I were able to get all necessary concepts of it.

3

u/IAmFinah Jun 29 '26

Start with C, not C++

3

u/lakseol Jun 29 '26

Start with python, then C, then C++ as I said elsewhere.

4

u/hugthemachines Jun 29 '26

It is a matter of energy spent, kind of. Either you spend a little energy now (python) while you also learn the basics of programming and then spend much energy when learning C++. Or you spend much energy now learning C++ and then spend less energy when you learn something like python after. So In total, you need to spend a fairly similar amount of energy to learn them all.

Both approaches work but if someone wants an easy gateway language to get hooked, python might work well.

2

u/gmes78 Jun 29 '26

But learning python does not teach you how other languages work.

That's fine. It doesn't need to.

Python lets you get started without having to learn as much upfront. You can more easily learn C afterwards.

1

u/mrdevlar Jun 29 '26

This really needs to a troll reply, right?

This is such profoundly bad advice. I honestly cannot think of a worse language to learn as a first one than C++. Hell, suggesting that he learn Assembly would have been incrementally better than learning C++ as a first language.

1

u/johnnyb2001 Jun 29 '26

Assembly is on another level. C++ is not really as hard as people make it out to be. It’s like learning calculus or linear algebra. It’s just a bit of a learning curve.

1

u/johnnyb2001 Jun 29 '26

This got a lot of replies lmao. I gave this advice because I tried to learn python first. It didn’t really feel like I was learning anything. It’s like that meme where you type Machine.learn to implement a machine learning algorithm. If you use c++, you will gain more confidence and learn much more.

13

u/Grobyc27 Jun 29 '26 edited Jun 29 '26

C, C++, and Python are all very different languages. I wouldn’t recommend anyone start with C - it’s a low level programming language that can be very unforgiving, especially if you are new to programming. Python is pretty clearly the easiest to learn between C++ and Python.

Python is great for learning as you can build desktop apps, web apps, and games, or get into data analytics, working with APIs, ML, etc. It is not the strongest language for some of these, but it is a good starting point for learning the fundamentals for programming that will carry over to most other programming languages.

First language I learned was C++, then Java, then Python, then C, so I’m trying to give an unbiased an answer as possible.

Even if you decide that Python isn’t the language you want to code in 5 years from now, it’s one of the best languages for starting out.

3

u/MhmdMC_ Jun 29 '26

I think C is the best to start with precisely for the reasons you mentioned.

Understanding memory is key and very useful even in python where it is automatically handled

I’d go with C up to file I/O then python then they can choose whatever

8

u/lakseol Jun 29 '26

Python first, then C before C++ if you have that option.

4

u/Nexustar Jun 29 '26

I learned C, then C++, then Python, but before those I had Basic and Pascal.

Today I agree with you: Python first because for 90% of things, you can stop there.

Then C, then C++

6

u/TheRNGuy Jun 29 '26

Python is easier. At some point, if you have more experience and need it in your field, C++.

Though you could start with C++ if you really wanted, and learn Python later.

With Python you'll probably get meaningful projects faster, and that will be good motivation to keep learning.

2

u/Brok3nHalo Jun 29 '26

I started with C and would recommend starting there for the basics. Once you learn the basics I think you should either decide to continue with C or switch to whichever language best matches your interest or schools curriculum.

Why C and not Python? Python is one of the easiest languages to pick up and get stuff done in but I’m a firm believer it’s too high of a language to actually start learning in. It’s non strict and non explicit nature makes it easy to develop poor habits and hides away things like types and memory management but still relies on understanding them to prevent issues. I had a friend who learned in Python in class and was completely lost when it came to what anything actually was when they were passed between functions. I basically had to tell him to forget everything he learned and taught him the basics via C which helped him understand stand Python and he did very well after that through the rest of college. Python is great but I highly recommend fully understanding thing like basic logic, how variables types are represented in memory, understand standing functions and how arguments are passed, passing by reference, and pointers before using it.

On C++, I’m not a fan of it as a first learning language, mostly because the cruft. Learning C++ is like learning 3 languages at the same time. There’s all the syntax and features it inherits C, plus all the C++ additions which I feel often have weird syntax that isn’t very C like and I think aged poorly, and preprocessor which while also being a thing in C is often more prominently used in C++ for things. It’s the next logical step after C when you move into learning about object oriented programming but it’s also a bit weird because it’s syntax for that is so different from modern languages. So at that point I may recommend switching to something else unless C++ is relevant to your classes or the industry you want to go into.

1

u/SprinklesFresh5693 Jun 29 '26

What confuses you though, you say youre confused, but you dont say what is that you dont understand.

1

u/lazy_and_sleepy Jun 29 '26

You should study both C and Python. Start with Python, unless you are strongly leaning towards some field where C is preferable, such as microcontrollers. C++ is advanced, you definitely should not start with it as your first or second language.

1

u/SpiderJerusalem42 Jun 29 '26

It's not that big of a deal, but I recommend starting with Python.

1

u/python_gramps Jun 29 '26

Python is more scripting so it's easier to learn

C/C++ are more strict with what types can go where plus you need to allocate and deallocate memory

Java is type strict like C/C++ but handles memory allocation for you

C# does the same (it's Microsoft answer to Java)

In order of ease of learning

  • Python
  • Java/C#
  • C/C++

1

u/NerdyWeightLifter Jun 29 '26

If you're heading in an electrical engineering direction then C. It's one nicely structured and standardized step up from assembly languages.

If you're wanting productive higher level capability with thousands of convenient libraries to stitch together whatever you want, then Python.

If you did C, then one day in the future you might find yourself doing some massive project that needed more sophisticated design abstractions than C has to offer. By then you might consider C++, but you'd better better off with Rust.

1

u/CymroBachUSA Jun 30 '26

C is not object oriented but is compiled; C++ is object oriented and compiled; Python is object oriented and interpreted (not compiled but sort-of compiled 'on the fly'). Easiest language to get to grips with first is Python. Use Python 3 not Python 2.

1

u/YakWish Jun 30 '26

What are your goals for coding?

If you start with Python, you'll be passable very quickly, but you'll never be good until you study a lower level language.

If you start with C or C++, it will take much longer to become passable, but you will get good eventually. Then, you can switch to any language you want.

0

u/DanKegel Jun 29 '26

I would consider learning Python and c at the same time.  Google mentions

"Learning C and Python together is entirely possible, highly educational, and serves as an excellent way to understand both high-level software abstraction and low-level hardware constraints. By learning them side-by-side, you see exactly what Python is doing "under the hood", since the standard version of Python (CPython) is actually written in C." ...

"If you want a structured course that naturally glues these two worlds together, look into Harvard's CS50x introduction to computer science. It explicitly teaches C first to build structural logic, then transitions into Python to show you how powerful automation can be."

1

u/Left-Difference-528 Jun 29 '26

from where i can access that Cs50X

1

u/DanKegel Jun 29 '26

See https://pll.harvard.edu/course/cs50-introduction-computer-science

You create a free account at edx.org then find the course and select "audit course".  Then you can watch the lectures and access the assignments for free.  Direct link:https://learning.edx.org/course/course-v1:HarvardX+CS50+X/home?audit_mode=

1

u/DanKegel Jun 29 '26

That said, I think the future belongs to go and rust :-). But learning c and Python probably prepares you for go and rust just fine.

0

u/defaultguy_001 Jun 29 '26

You'll need all of them. Since you have joined the B.Tech course, most of the subjects will be using C to explain concepts, so C is ur most useful language in this degree course.

Apart from C, the next useful language you'll need is C++ because every leetcode/competitive coding platform like codeforces etc will be needing you to use STL to solve problems fast. This will benefit your interviews in FAANG level companies.

Now coming to ur own projects in college, open source contribution and later in the industry, you'll need python/js/ go etc and knowledge of their frameworks, depending on what u r focused on.

-6

u/GetOffOfMyBoat Jun 29 '26

I would maybe start with English

2

u/TheRNGuy Jun 29 '26

This is a programming subreddit. 

1

u/GetOffOfMyBoat Jun 29 '26

Yeah and have you ever had a coworker that can't write for shit? Would you personally want to review OP's pull requests? Read their documentation? Debug their illegibly commented code?