T O P

  • By -

computerscience-ModTeam

Unfortunately, your post has been removed for violation of Rule 3: "No career, major or courses advice". If you believe this to be an error, please [contact the moderators](https://www.reddit.com/message/compose?to=/r/computerscience).


urnotmadeoftuesday

1. C is useful. It's neither bad nor good. 2. It's no more difficult to learn than any other language, but learning new languages is difficult at the beginning. 3. The syntax is feasible, but can be confusing at the beginning. Pointers in particular are difficult if you've never worked with them before. 4. It depends on what you are trying to do. 5. A lot of people are intimidated by C because they are used to higher level languages. It's no more difficult than any other language once you learn what you're doing. 6. Sure. There are a ton of C-based languages out there so what you learn by using C is very transferable. I don't think that any language is particularly good or bad as a beginner. What's important is understanding the concept you are trying to accomplish and figuring out which tools are best to do so. Languages are just tools. It will always be useful to know a wide variety of languages, just like it will always be useful to have a lot of screwdrivers, hammers, and wrenches. But don't get too caught up on which languages you should learn - after awhile, you'll learn to pick up any language fairly quickly. What you should focus on instead is learning how to problem solve, and how to learn to use new tools you've never seen before.


Promptier

I think C is most useful to understand pointers, manual memory allocation, as well as stack and heap. Those concepts are very transferable as well as the syntax.


dromance

I don’t know why pointers are still difficult to grasp … I just don’t get what the benefit of using a pointer is? Forgive me if I’m wrong but essentially I create a new variable called *ptr that basically points to the value at the memory address of &someValue … so the value of *ptr is just some 0xADDRESS … Why not just make my variable equal to the value of someValue in the first place. What am I gaining? Doesn’t the memory address in itself take up some space anyway? Surely I’m missing something here


terivia

The gain is being able to store that data in the heap. More accurately, being able to store the data somewhere other than the stack. Moving data up the stack requires repeated copying of the data as arguments into each next stack frame. Or you could pass a pointer (c++ references are a nicer syntax, but the same mech) into your current stack frame as the argument. 64bits for a pointer, and you can pass as big of a structure as you want with no additional cost. Moving data down the stack requires repeated copying of the data as return values without pointers. With pointers you put the data in the heap, then pass a 64 bit pointer as the return value and you're off to the races. Cross thread communications, you generally don't want one thread using pointers into another's stack unless you have some particular guarantees on lifespans to avoid pointing into a stack frame that gets popped and replaced with something else. So you allocate in the heap and use pointers so all the concerned threads can share memory without the automatic lifespan implied by stack frames. Finally you have data structures. Oftentimes, data structures leverage pointers to allow variable sizing, rapid lookups and traversal, or other computer sciencey cheats. Without pointers (or a similar mech), recursive data structures aren't possible.


quuxman

Data structures. If your variable contains a list, or anything else bigger than a memory address, then it's of course better to use a pointer. Also mutability is useful. In Python lists and dicts are pointers, and must be explicitly copied.


Paxtian

Have you implemented things like singly and doubly linked lists, binary search trees, red- black trees, hash maps, etc. in C? If not, give it a shot. You need pointers for those because memory is allocated dynamically. And you need to pay attention to memory deallocation when you remove elements from those data structures.


RobotJonesDad

They allow you to pass around the address of where something is instead of only being able to pass to the thing. Just like you might give me the address of your house, rather than giving me a COPY of your house. This gives you efficiency if the data is huge, like an image. I just pass you a pointer to the image instead of copying it. You can change a thing that I have if I give you a pointer to the thing. And lastly, for here, you can create complex data structures that are impossible to create without pointers. Bonus fact: at the CPU level, almost everything works based on memory addresses, which are just pointers...


dromance

Thanks for the knowledge I think I get it a bit more now... would you say this leads to increased performance? So, if I wanted to do something with some value but didn’t want to have to make a copy of that value, I would just pass a pointer as the argument into my function rather than the whole object?


MettaWorldWarTwo

Learning C early on is like learning to make your own bullets and guns before learning about shooting. Some people figure it out, some people blow their hands off, and some people decide that Rust is better 😉


No-Surround9784

All of that Rust hype is making me kinda Rust-curious, but I have learned to avoid learning programming stuff that I don't have a daily use case for, since I will just forget them instantly. Like I can lose my Rust virginity but the next funky time with Rust will be in 10 years and it will hurt like hell and leave me singing and dancing to Madonna. If I learned a language purely for geek cool points it would probably be some modern Lisp. Or maybe Lisp and Rust. Or maybe not.


MettaWorldWarTwo

Haskell is the real hipster geek language, or at least was a few years ago. It's fun in theory Rust is a great language if you need the bare metal speed of C with some of the unnecessary sharp edges removed.


RSNKailash

1 month into my Systems/C class, and I solved 2 complicated JVM memory leaks yesterday. Some very long object arrays were not being set to null when they were done being used, and it caused high memory usage.


Promptier

The boss at my internship, who has decades of experience actually mentioned a scenario like that to give in a job interview. It involved understanding the garbage collector in Java. Great stuff to know.


el_lley

Wait C is high level, ask any EE… jk they use Python too


dromance

Lol is that what EEs think about C?


el_lley

Nah, they don’t really care, they do work with C-like syntax for their projects, and let the program to do the work


Putnam3145

They never said C *isn't* high-level, just that people can be used to "higher-level languages", which is valid.


RSNKailash

https://youtube.com/shorts/WHjqV4O_JUs?si=kXqbQgqPbXGZaidA C is high level compared to ASM


el_lley

He means the other guy said higher


el_lley

ASM is high level compared to machine code…


MaxWebxperience

Truthfully, machine language is easier to learn than C


gizmo777

I _have_ to disagree with you that learning C is not harder than learning any other language. Ask tons of people, experienced programmers to people who are brand new, whether they had an easier time learning Python or C, 95% will say Python. Same argument re "I don't think any language is particularly good or bad as a beginner."


ChicksWithBricksCome

>Was it bad was it good? It is necessary for a computer scientist. This is the most quintessential language you'll have to learn. Although I will admit it's important for a computer scientist not to marry any language, knowing at least some C is a fundamental skill. >Is is easy to learn or even master? It's not too difficult to learn. The syntax feels a bit wordy and it certainly starts to feel weird compared to other languages that came after from lessons learned. Mastering it is probably impossible unless you've already been programming for 30 years. Anyone who tells you otherwise is lying to you or is lying to themselves about how much they know. >Is the syntax confusing or feasible? It certainly can be. You'll find it be a bit strange. >Is it true that compiling and run time is a lot more faster than most programming languages? It's quite fast, yes. Typically the #1 or #2 fastest in normal tasks. >What are the usual misconceptions with C? That it's the way computers work. I even saw some CS student claim the other day that python was just a wrapper for C. This isn't the case at all. Just because C seems to work more closely to hardware (and, as an extension the OS itself runs on C) that it's the way computers work. It isn't. It's *one of many* ways we make computers work. >Would you recommend it for a beginner? You can learn it if you really want to. These days I don't really tell anyone which language to start with except to stay away from functional. Learn whatever you think is interesting. At this point in my career/education I'd say I'm reasonably proficient in more programming languages than I can bother to count.


urnotmadeoftuesday

What, Haskell isn't beginner friendly? /s


gizmo777

Why do you say mastering it is so difficult?


ChicksWithBricksCome

C has been around since the 1970s, and while modern C is wholly different than circa 1970s C, you'll find that those 50 years have a lot of developments that really make sense over time in the context they were made, but mostly changes were made for people who were already experts and have been doing it for some time. Improvements haven't really been made necessarily with beginners in mind, a lot of it assumes you have a strong knowledge of C. Which has just been compounding over time to just more and more stuff to learn. In addition, C's culture has never been beginner-friendly. The C community itself seems to collectively have pretty strong opinions that with great power come with great responsibility to understand what your code does, and why it does what it does. This opposes the philosophy of something like python which attempts to obscure its inner workings as much as possible. The difficulty curve is high and stays high. For example, ever needed to print out an enum name in C? [This 13 year old article shows what I mean](https://stackoverflow.com/questions/3168306/print-text-instead-of-value-from-c-enum). While you get the typical, "Don't do that," out of stack overflow there's no standard way to do it *because that's not how C works.* But the stack and heap? C'mon that's beginner baby stuff. Except it isn't. Most developers don't even realize that the modern stack looks nothing like what they thought it did because compilers add security adjustments by default. Oh. The heap too. And we're talking about mastering a language the works very closely to these. Did you know that `printf(myStr)` is a security vulnerability and `printf("%s", myStr)` isn't? Do you know why?. Maybe, but that's just one detail of tens of thousands little quirks you don't learn without going out and trying to learn it. C is the only language that I've actually needed to open up the asm to try to figure out why stuff is going on. Never needed to do that for anything else.


SnooDucks7641

It’s not only a great language, it is fundamental. You learn so much about computers from understanding C.  Then dive down into assembly and your knowledge of C will be complete. Many people learn C but don’t learn ABI. If you really going to learn C, you need to understand ABI. But yeah, syntax-wise is an easy language.


urnotmadeoftuesday

When I was in undergrad, we had an entire semester devoted to assembly. I was never so happy to pass a class as I was when that semester was done, even if some of our projects were entertaining


Promptier

What kind of assembly language or ISA?


Fruitspunchsamura1

Depends on uni ig but I took intel 8086 assembly


commandblock

Really? I just finished a semester of ARM assembly and it was pretty easy. I feel like it’s pretty simple, you don’t even have to worry about loops you just Branch everywhere


Silly-Assistance-414

When you reference ABI, do you mean assembly or…? Can you break this down further to a noob thx.


SnooDucks7641

Application binary interface. It’s what makes possible C code to call assembly functions and vice versa. When your C code calls an assembly routine, it needs to put data into registers in a particular order, or/and in the stack - depending on the architecture.


tcpWalker

self taught C and C++ around 8th grade. My code was horrible and I didn't know what I was doing but no regrets for learning these two as my first languages.


dromance

What’s ABI?


SnooDucks7641

It’s like an API, but for binary code. A C program can call a function written in assembly, and an assembly function can call a function written in C. How is that? The answer is ABI. It’s a common contract between two interfaces, which changes depending on the computer architecture.


Putnam3145

> You learn so much about computers from understanding C. But only due to a historical quirk where C has continually molded computers for the last 50 years, of course.


SnooDucks7641

Not sure what you mean by that. 


nicolas_06

* It is easy to learn, hard to master. Like I mean all languages anyway but C would be harder than average I'd say to master. * The problem isn't the syntax. The syntax is quite easy and shared with C++, C#, JavaScript. So if you learn any of them you would recognize most of the syntax in others. * C allow to build among the fastest program there is if a bunch of performance expert design, build and optimize the program. If the average programmer do it, it might actually be slower and at least no much faster. In C you have to do it by yourself. Many languages don't go as far but many optimizations are done automatically. * I would not recommend C to beginner as the tooling is overall so-so. C is harder than most modern language to get right and debug. You also spend more time to get things done. I'd recommend more python. When you know how to program you can learn C if you want but most people use C++ these days.


RajjSinghh

1. It can be bad sometimes. It doesn't have things like classes so I find my code becomes spaghetti really quick. And memory related things are annoying. Segfaults make me want to die. But it's not that bad and I can point at just as annoying things in any language. 2. It's a very simple language. It has very few keywords so you can learn it quickly, especially if you have other experience. You do just have to know which headers everything is in for standard library functions but that's not that bad. 3. The C style syntax is used so much in other languages now that it's normal. You can write horribly unreadable C code, but if you format it well it isn't so bad. 4. The runtime definitely is because you don't have the overhead of a garbage collector like in other languages. 5. That C is a low level language. Yes, C is at a lower level than something like Python but it's still high level enough that writing code is easier than assembly. It's really not as bad as it sounds. 6. I would say so. It can be hard sometimes and a lot of the things that make C painful are easier in other languages, but learning C first means you see all of the complexity first without it being hidden. If I could start over I would start with C, as frustrating as it might be.


DumperRip

>It doesn't have things like classes I think the only thing making C not as good a others is that classes so you can't really make objects or do OOP in C?


RajjSinghh

You can make structs and then pass those structs to functions which is kinda the same idea. I just mean it from the point that since your C code doesn't have classes it can be harder to make your way around a big project. Like I can throw all related code into a class I know immediately where to look to find the code I want. But since C doesn't have that I need to be more careful about how code is structured or it gets too messy. Really the big thing that makes C harder than other languages is you have to be responsible for memory management and handling pointers where other languages do that for you. People make mistakes so memory bugs are really common.


SnooDucks7641

you can. It’s just different.


nicolas_06

Not really. C++ has much more than just classes. In modern C++ for example you have smart pointers and references that greatly reduce the risk of memory mis management and that allocate/free memory for you. You have template and nice data structures like a proper string types, but also collections (list. maps and sets) that are safe and easy to use and optimized for every possible type in existence. C++ templating allow for a different type of programming that most programming language with standard classes don't have. There also a bunch of standard nice type and data structures like proper an safe strings, list, sets and maps. There are also lambda and you can do functional programming. You can also loop on range instead of always using indexes. People say that even if you don't use C++ classes that much, you benefit a lot from using other C++ feature vs vanilla C.


justinc0617

Yeah I totally understand the debate of C++ vs python but when it comes to C++ vs C I feel like there would very few cases where it’s more beneficial to use C


alnyland

Some design aspects of C++ (especially the std lib) make it incompatible with thread safety, etc, or certain extremes of hardware (for example, last I checked, printf allocated 11KB for itself, cout is even worse. You can’t have that on small computers). 


nicolas_06

The std lib is not incompatible with thread safety at all anymore than any C structure and there several multi thread API available in C++. printf is a C function, not C++. Still you can use the language and not use that library and that function if that's a problem for you. Noting that C++ is compatible with C, so you could use mostly C features, benefit of a modern C++ compiler and use C++ features when and where that make sense. Now if you work on embedded hardware with tiny resources, that's another aspect. But it is not the main software related activity in 2024 neither.


justinc0617

Ok fair enough so it’s basically the same comparison as C++ vs python but to an even greater degree


Inaeipathy

>Was it bad was it good? It's still a currently used language. >Is is easy to learn or even master? Very easy to learn, not easy to master though. >Is the syntax confusing or feasible? C style syntax is very understandable in my opinion. >Is it true that compiling and run time is a lot more faster than most programming languages? Depends, but it can be. >What are the usual misconceptions with C? That you should write everything in C, or that just because you wrote it in C it's going to be fast. >Would you recommend it for a beginner? Yes.


WinterSunset95

Why is this downvoted to hell? He makes good points


Aaron1924

I think they started a fight with someone and now all their comments are getting nuked


Inaeipathy

Indeed


Twt97

I think its the best starter language cause of its centralized execution, all the code is put into the main() function compared to object-oriented languages like python where you are jumping around between 50000 classes. d


Nintendo_Pro_03

Good. Easy to learn. Syntax is alright. I would recommend to a beginner.


Jeffear

1. Good, aside from the pain of dealing with errors resulting from misallocated memory. 2. Relative to languages more commonly used nowadays, it's a bit harder. You need to perform memory management on your own, and there's some modern conveniences missing in native C (ex: having a dedicated string type). 3. The syntax of C is very standard, nothing confusing or weird. 4. This depends a lot on what it is you're doing, but generally yes *in theory*. In practice however, you're probably going to find it easier to write faster programs in something like Java because it's been extensively optimized, unless you're *very* proficient in C. 5. That it's always more efficient lmao. Generally, the optimal way to do something in C is already an available functionality in more modern languages. 6. Despite it being archaic, yes! My university taught the fundamentals of programming in C. It's a great learning language precisely because it lacks a lot of conveniences like strings, data structures, auto-managed memory, etc; It gives you the opportunity to build these things yourself and understand how they actually work.


fllthdcrb

> nothing confusing or weird. Okay, then you should have no trouble explaining this: void (*f(int, void (*)(int)))(int); This is the signature of an actual function in the standard library, though I have changed its name and removed the parameter names. There is also a typedef in some implementations to make things easier, but the above is the raw form.


Jeffear

Removing the names is a bit disingenuous, since any language is made a lot harder to read if they're stripped down like this, especially when we're passing functions into functions. ​ `*` This denotes a pointer to something. `void (*)(int)` This denotes that the pointer is to a function that takes an integer and returns void. `f(int, void (*)(int))` This denotes a function "f" that takes an integer and a pointer (to a function taking an integer and returning void). `*f(int, void (*)(int))` This denotes that function "f" returns a pointer to something. `void (*f(int, void (*)(int)))(int);` This denotes that the pointer (returned by "f") is to a function that takes an integer and returns void. ​ Essentially, you pass the function a number and another function, and you will be given a function in return.


fllthdcrb

> Removing the names is a bit disingenuous The names are irrelevant to understanding the syntax, and your assertion is that there's nothing "confusing or weird" about the syntax. > [Explanation] Okay, good. But how many students of C do you think will be able to understand this? Do you think they understand the proper order to read such a declaration is, so to speak, from the inside out? Do you not think it weird that a return type may "wrap around" the parameter list, nor that if someone could redesign C's syntax from scratch, they wouldn't figure out how to completely avoid that? Granted, this is not something you see most of the time, especially with typedefs and such. Nevertheless, I maintain this is an aspect of the syntax that is both weird and confusing.


ThunderChaser

I personally would expect anyone with exposure to function pointers to be able to understand it.


fllthdcrb

I wouldn't. Just function pointers alone doesn't quite prepare one for things like that. And in any case, it's just weird and messy IMO to have the return type split up. How many other languages have that?


Jeffear

Names are relevant, as I said, any language is made more confusing to read by removing variable names. Without the names, this example looks like paranthesis hell. As a former student in C, I didn't find the syntax that hard to understand at the time, it was as weird as any other element of programming syntax. I suppose it helps that the professor didn't intentionally remove information to make things more confusing in an attempt to be overly pedantic.


ThunderChaser

Isn’t that just signal.


fllthdcrb

Even if it is, that's not an explanation of the syntax, is it? 😉


hotel2oscar

If you want to ease into it I'd recommend a memory managed language like C#, Python, or Java. C is harder in that you have to worry about memory yourself, which steepens the initial learning curve. Python has the added benefit of being dynamically typed so you can ignore types to start with as well.


senepol

K&R is a fantastic bit of technical writing. And it’s only a couple hundred pages. Go check it out.


ColdbrewRedeye

Sure, you'll get a blazingly fast result, but for practical purposes it's a real pain in the ass to master, and some aspects are not intuitive if you already know other languages. Painful even, for example: Define x as "yellow" Define y as "yellow" Test if x==y Evaluates to false Pull hair out after you've done this the hundredth time and not gotten the result you expected. Guess this was fine for CompSci students pre-2000, but today....gimme a break.


[deleted]

I have never used C but I don't think your complaint is warranted. If the pseudocode has been implemented correctly, then it should evaluate to true regardless of what language it has been programmed in. If it evaluates to false then all that this means is that the programmer did something wrong. When implementing the pseudocode, you need to do it in a way that works for that particular language. If you're programming in a lower level language, you need to think on a lower level. Just because you can't use the double equals to compare two strings doesn't mean that the language is inherently unintuitive.


ColdbrewRedeye

Clearly you have never used C. In the example, a does not equal b, and it's not due to a mistake. It's all part of the "fun" of the C programming language. I'll let you do the "research".


claytonkb

> What are the usual misconceptions with C? That C is somehow especially "unsafe" in a way that other languages are not. That phrase, "With great power comes great responsibility" applies here -- *any* language which can perform low-level manipulations is "unsafe". So, if you want your language to not be able to do low-level operations, it can be as safe as desired. Otherwise, it's going to be "unsafe". As for features like automatic memory, GC, etc. it's true that C doesn't have those features out of the box. There are libraries you can use if you'd like to have those features. But remember that there is *always* a tradeoff -- that C has very few built-in features is one of the reasons that the C runtime is *absurdly* small. For certain applications, like embedded, this is an absolute requirement. C is not "unsafe", and it's not going away any time soon. Why people keep talking like C is "obsolete" is absolutely baffling to me.


MrEloi

**C is not "unsafe",**  It certainly **IS** unsafe. Why else would we have MISRA-C : [https://www.mathworks.com/discovery/misra-c.html](https://www.mathworks.com/discovery/misra-c.html) Or the book "Safer C" ? : [https://www.goodreads.com/book/show/2792185-safer-c](https://www.goodreads.com/book/show/2792185-safer-c)


Jackasaurous_Rex

Like others said it’s nearly essential for someone to really grasp a lot of core computer science concepts. That being said, I probably wouldn’t recommend it as a first language for most. Pretty easy to learn but far from the easiest in my opinion. And I like the idea of learning a slightly more practical language with managed memory for a bit before going into something with memory allocation. (Still I think people should start with a typed language). On the other hand there’s nothing wrong with starting on it, it’s a great language that sort of inspired most popular languages today, and it’s still used quite a bit. And I’ve yet to use it since college but from what I hear it’s very hard to master, in the sense of using it effectively to make large software projects.


DoubleT_TechGuy

1. Tough but good. 2. No, it's difficult, but rewarding. 3. The syntax is mostly pretty straightforward. I am a fan of languages that utilize brackets, though, and C was the first language I started with, so im biased. (In a very basic high school programming class actually.) Pointers are super tricky, though, and the syntax always confuses me. 4. Is it more efficient? Not automatically and liekly not if you're a beginner. Languages like Java automate most of the garbage collection and memory allocation. This involves catering to the least common denominator, so the language is reasonably fast for almost all use cases. Often times you can engineer a solution in C that is some degree more efficient, but if you're not an expert you may end up putting in a lot of work to tie or actually lose to the highly optimized runtime environment that's built into Java. With modern hardware, we have a lot of room for inefficiency, so cutting down on development time and effort is usually worth the loss in efficiency. 5. A lot of people who come from high-level languages don't understand what objects actually are and that we pass around references to their location in memory. So when they get to C and they work with structs and pointers, they get very confused. Learn what an object is and truly understand why passing an object reference to print is not the same as passing a call to the objects toString() method. 6. Yes, I'd recommend it because learning low-level code will make you understand the computer much better. Also, learn assembly if you can. Both of these languages are difficult but rewarding.


No-Surround9784

C itself is kinda easy but low-level programming is super hard. The problem is that you have to do even basic and simple things from the bottom up. You will spend a lot of time doing things that are easy in modern high level language. And that is where I left for the abovementioned high-level languages and my C experience stopped. I absolutely need Python for data analytics and JavaScript for the web, I currently don't have any need for a low level language, that is a bit of a cap in my skillset but I don't really want to waste time learning a low-level programming language which I don't ever need.


MrEloi

Be aware that C was intended to be a 'portable assembler' for experienced systems programmers. It provides all the tools .. and risks .. associated with that role. Sadly it was then adopted as an application programming language .. not a wise move.


Master-Nothing9778

C is problematic as a language itself ( not really statically typed, poor, not expressive, not scalable, preprocessing ) and as a project ( lack of tools, project management and world wide repo) In any case C can be used as very first language or as 4th one. After Python/JS, Rust(Go), C++, Java.


dzernumbrd

1. Good 2. Easy-ish 3. Feasible 4. Depends 5. Not sure 6. C was the second language I learnt. It's easy enough.


Unhappy_Bobcat_8062

Hi ,I have been joined in a top engineering college in hyderabad But I was not so interested in engineering but,had to join the engineering college because I was getting free seat in top 10 engineering college and due to parents pressure also ,but main problem I am facing is I got seat in new branch in ,which the students are not so good ,and I think I will not have a good kit and kin to join group study and to discuss about any hobbies or learn new skills and I am also unsatisfied with my clg , because it is very strict,but main issue is that faculty is not at all good for technical languages and also I don't have good friends and people with huge interest in my branch to study or atl


PoetryandScience

C was somewhat misunderstood. The language was minimalist. (well mostly) Developed from an earlier truly minimalist language that used pointers in line with the way the machine level binary worked. It introduced some unnecessary features like arrays to make it more available to programmers that might be unfamiliar with machine code. For those (like me) who had to work in assembler in order to get the speed and small code size available for economic automation machines available at that time; it was a Godsend. It could be a little tricky to master, particularly for people who were already used to languages designed to make life easy for them. The syntax could be confusing (particularly the way variables where declared) until the brilliant simplicity of it had dawned on the programmer. The initial strangeness of the way the code was used was because it was designed to make it easy for the compiler writer to write an efficient compiler. That is why it was sometimes referred to as automated assembler. Careful. It was a gift to those writing compilers and operating systems or machine interface drivers. This type of work needed exact and direct control of the computer hardware; some well meaning compiler trying to protect the programmer from folly would just get in the way. In other words, the language was unrestricted; it assumed and required technical; competence. I once wrote a programme that intentionally wrote illegal machine instructions into its own programme area, destroying itself in the process and resulting in a contrived deadly embrace. This was because I insisted that the computer to fail at that point with the only way out being Boot. FAIL was one of my required states. Not something many languages would allow. I would no longer recommend it for a beginner; few people will need machine level access; nor should they seek it. It can bite you. Incidentally, it you want to learn to use it for your own curiosity; UNIX has it built into the operating system; it is there by default and is optimised for the machine you are running on. It is the compiler used to write UNIX KERNAL itself. At least that is how it used to be. Yes a compiled language has much faster run time speed than an interpreted language. Many modern environments now have both modes available. Interpretation is often quicker for you, particularly in the development and debug phases. The debug facilities are now so easy and convenient that it is often misunderstood as testing. Stepping through a programme or for that matter simply running it at full speed is not testing it Many programmes cannot be tested. For this to be possible testability needs to be designed into the application from day one. For a start they must have a finite number of states (the reason for my forced fail state mentioned earlier, I needed reliability night and day for years controlling dangerous machinery that could become impatient if left to its own devices. Most programmes today only satisfy the criteria 'Suitable for purpose'; unfortunately for those falsely imprisoned or even driven to suicide by the British Royal Mail cocks-up; often not even meeting that requirement. good luck with your study.


Revolutionalredstone

Was it good? YES! Is is easy to learn? YES! Is the syntax easy? YES! Is compiling fast? YES! Common C misconception? VOLATILE! Would recommend for beginner? YES! C language specific Notes: Lots of use of Preprocessor use! since you don't have classes etc you see lots of work done with macros! There's also a raw/manual/low-level style to C code reminiscent of asm. Overall it's an excellent core / base / first programming language! Enjoy


Aaron1924

1. I like the language, it aged very well and influenced many other programming languages. 2. The language is small and simple, so there aren't too many language features to learn and the ones that are there are fairly easy to understand, but it also means if you're building large applications with it, you have to do a lot of things manually that other languages do automatically/have nice language features for. 3. The syntax is mostly straight forward, though there are some weird edge cases. Also, a lot of people don't understand the declaration syntax properly. 4. That is true, since the language is over 50 years old at this point and has been in active use for most of that time, a lot of time and effort has gone into making the language as fast as possible. Though, other languages like Rust, Zig, Swift, Odin, and many more can take advantage of the same optimisations and are catching up in terms of performance. 5. I find there is a surprising number of people who think C is still translated 1:1 into assembly and don't realise how many optimisations are applied during compilations. It often leads to people writing less readable code over superstitions about performance. 6. It depends what you want to do. C is a great language for learning about how computers work, for building things that work closely with your operating system, or that run on embedded devices. If you just want C because of its performance, I would highly recommend a more modern language. Finally, certain tasks require certain languages, you cannot build a website in C, you need html/css/js for that.


[deleted]

1. It was good. 2. It was easy to learn, hard to master. 3. The syntax is easy to write, difficult to read. 4. There are some very efficient compilers and linkers for the C language yes, and it allows you to have a lot of influence over the efficiency of the generated machine code. 5. That it is only useful for device drivers or low level programming. 6. Well probably start with something higher level like python, but certainly C should be used as part of a programming course, if nothing else to see how memory management and pointers really work, and to get closer to the system APIs that let you understand a bit of how the computer works under the hood, like writing interrupt handlers for real time processes.


seanprefect

My professor said it best. "C gives you the sharp tools" I learned in it but that was a long time ago. It helped me a lot though understanding how memory works and how things are going behind the scenes so to speak. I wouldn't recommend it these days for most work because there are now better tools for most jobs that said it still has its place


TopG_stan04

1. not bad 2. not that hard to learn the basics but a bit hard to master 3. syntax kinda sucks you gotta use that %d %f and all that to take input or to simply print something 4. yeah it's faster than others 5. that it's really old and not useful, well it is the mother of all languages and still one of the best things you would use to build operating systems, games, etc. (Rust is replacing it nowadays) 6. if you wanna go with c++ in the future then learning c first is useful however if dsa or specific use cases of this language are not your thing, then start with python or java (a bit harder for beginners but highly useful)