what is the best way to learn C ? I know basic python but would like to learn C, I tried searching online but couldn’t find a good resource that’s good for a beginner like me. any suggestions ?
what is the best way to learn C ? I know basic python but would like to learn C, I tried searching online but couldn’t find a good resource that’s good for a beginner like me. any suggestions ?
Tbh, A-B-problems are something super common if you work in IT. So much time is wasted by going down the wrong road because someone comes to you with the apparent solution that they thought of, instead of just posing the problem they want a solution to.
In case of this post, there are quite a few reason why the OP wants to learn C after learning a bit of Python, and some of them have C as the correct solution, some don’t.
For example:
Especially the “C is faster” argument is often a trap for new programmers, since C is only faster if you really know what you are doing. C can also be much slower if e.g. you mess up memory management. Or, more common, C is not at all, because the rookie programmer gets stuck at arcane error messages that they can’t fix.
In most cases the pure execution speed is not what is limiting the performance, but instead the algorithms and data structures used. For example, if you loop through a large array to find an entry it doesn’t matter that the looping is 4x the speed, when you could also just use a hashmap/hashset, which will be orders of magnitude faster.