Factsheet
Why did you learn C? I'm interested in programming because I enjoy building things (websites, apps, desktop apps, games, etc), what sort of things can I do with C? I've heard it's an extremely fast language. What are things you've made with the language? Do you enjoy using it?
I'm a begginer in C the only thing I wrote is hello world with printf, so I'm sorry if this is a dumb question but what can you actually do/make in C? I tried finding it on Google but the only thing I found was operating systems which I doubt I will be making the new windows anytime soon. :p So I would appreciate if someone could give me some pin points on this.
What resources did you use to learn C ? As a beginner to C, I'm finding it really difficult to pick up the language from just reading about the syntax rules. Are there any good resources / books / youtube videos to not only learn the syntax, but also the more advanced concepts (pointers, scope, etc)?
Edit: I know learning how to code takes time, but I'd prefer resources that wouldn't be so time consuming. More of a resource that I could approach when I'm stuck on a single topic
I’ve seen a lot of comments around the internet people saying things “C teaches you how computers work” and “implement DSA in C and it makes a huge difference” and etc. Is C like the Latin of the programming languages? What is so special about C?
str_var = "A string" count = 0 for c in str_var: count += 1 print(count)
can anyone explain what the "c" stands for in this? Does it stand for character? (Code came from a learning software I am using)
My project last week was to write a compiler for the B language, going off of Ken Thompson’s January 1972 description of B. The project was a success but by Friday I had decided that the compiler needed to be slightly extended to make it a 1972-era C compiler instead. The reasons for that are probably quite similar to the reasons that motivated Dennis Ritchie to sufficiently alter B when he implemented the first compiler, that he felt the language needed a new name.
Specifically, B was designed as a word-oriented language, with no support for manipulation of byte quantities. This is not surprising as all of the computers used by Thompson and Ritchie at Bell Labs before the acquisition of the PDP 11/20 were word-oriented machines. Their work on Multics used the GE 645 and the first version of Unix was developed for a PDP-7.
However the PDP 11 was a byte-oriented machine. A PDP 11 implementation of B was produced, but it had two weaknesses. First, although the B compiler produced an executable, the executable consisted of a sort of byte code combined with an interpreter core that executed the byte code (That’s not entirely accurate but close enough). Second, manipulating character data was unwieldy, yet PDP 11 Unix was byte-oriented.
Therefore the main differences between B and the first C were two: C supported the ’char’ type and C was compiled to PDP 11 machine code. If you look at the source code of the 1972 C compiler I linked above, it is almost identical to B code with the exception of the addition of the types ‘char’ and ‘int’ and, as a result, the ability to specify the types of function parameters and automatic variables.** Therefore, I propose that the name ‘C’ for the new language was chosen not (only) because the letter C follows the letter B in the alphabet, but also because C stands for ‘C’har and ‘C’ompiled. Dennis Ritchie does not mention this possibility in his essay on the history of C, but I think it makes sense.
**This also leads to the purpose of the ‘auto’ keyword. In B, every identifier used in a function had to be declared inside the function body as auto, ext(e)rn, or as a label (goto target). The reason for this is that this allowed the (very small) symbol table in the compiler to be completely purged at the beginning of every function. In B, ‘auto’ meant “this identifier is a stack variable, not a global variable and not a label.” When the C compiler stopped purging the symbol table at the beginning of each function definition, and automatic variables could be declared by type, the ‘auto’ keyword became obsolete. That was probably sometime in 1972.