So I might be getting a job using C and I have a week to study it.
I said in my first interview I have a year experience in C even though I don't
I said this because I've programmed using C++, C#, Java and SQL for 4-5 years so I figured it wouldn't be that different.
Sure enough in the first interview I knew the answer to all their questions since most of it bled in from other languages (except some of the stock market ones, has to do with the job). So I'm not too worried.
But just in case I get blindsided by something I want to make sure I'm fully prepared and don't jeopardize anything, especially since its a small team and what they do is a big deal.
What would be a program that I could learn/write that would fill the gaps of what I don't already know with C, in other words, what it would be used for more often than C++ or C#?
Quickly learning C
Get ready to be fucked when none of your pajeet-oriented programming practices work.
where in that did I say I was a copy/paste pajeet?
TL;DR is that C is the brick and mortar of operating systems for computers and machines and is very good at quickly and efficiently running through highly intensive programs. It's the KISS of languages.
Write a simple socket server.
thanks
Read K&R. Learn how to use pointers and dynamic memory allocation.
This. K&R C should then be followed up with Expert C Programming by Peter Van Der Linden.
Also make sure you understand function pointers, I've noticed that many C++ programmers don't.
As one preferring C++ over C, I can confirm this.
Fucking LOL. You can't learn C. It is literally impossible. The amount of UB is infinite.
GCC and LLVM are actually not standards compliant because the compiler devs themselves can't even understand the convoluted mess that is C.
What kind of NPC tripe is this? Engineers fucking love working in C.
Look up the slideshow called 'deep c'
Yes. Read K&R and work the examples. It's a short book. Get used to passing pointers to structs as function arguments. pointers to structs is C.
Read annex J of the standard. As long you don't try to be overly smart, it's fairly easy to write portable, well-defined, C code.
I read that. It's a very entertaining read. It's also non-exhaustive.
As I said, infinite number of UB. This is the power of C/C++. Only Cniles defend that garbage.
Really? What's an UB case that isn't listed there?
Sorry, I'm not a nigger. I don't use dangerously unsafe languages.
Fuck off. Why do you think we'd want to work alongside a complete newfag or pajeet such as yourself? It takes literally years to gain mastery at writing good C code. Back to Jabba with you, cuck.
But isn't Zig Forums always saying that C is so simple?
Why are you even here? You're not fooling anybody into thinking you have any knowledge of this subject.
stfu nigger
Congrats on the job.
With 4-5 years of experience in C++ your are very well setup for it. The jump to C has less to do with learning the language it self, but in letting go of classic paradigms and adopting into what the code base does. There is always the adaption phase when getting into the job. You will read the previous code base and try to integrate into that long before you start actually writing shit.
C code bases are WAY more diverse than anything modern, because there is less of a framework to begin with. Some opt to replace OO with a whole of entity component system. Understanding that ECS then becomes way more important and all of that is largely bound to the code base you will be working on.
Don't sweat it, read up some articles of going from C++ to C and the rest will mostly depend on how the code base is layed out.
Embrace not having to layout everything in objects with complex inheritance.
On a personal note: the biggest C obstacle for me was understanding how to properly work strings, there is so much to do wrong.