What can you program in C Sup Forums?
What can you program in C Sup Forums?
Programs that do math. Also additional features to unix utilities.
DLL files
hello world
Fuck C and use Rust.
OP here. Is C even worth learning? Not from the perspective of being employed, but making certain software.
It's useful only if you use Unix. If you use Windows or Mac OS X, don't learn C.
That said, I use Unix and love C.
Or hobby I guess.
Been using it for hobby shit for more than 15 years now. I rate it as my favourite language but I'm not sure if that's just because it's simply the one I know so well and it's effectively holding me hosting.
>tfw programming Stockholm syndrome
Are you me?
I've been using it for 17 years and I consider it my favorite despite how tedious it is to get anything useful done in it. I only like it because I know it so well.
Are most computer viruses programmed in C?
>hosting
Meant hostage DAMMIT. Too tired for this shit.
Tedious indeed. It does give me a raging nerd boner, though.
C isn't tedious. Unix userland source code isn't hard to read at all.
I'm hard when I read it though
so inconsequential but struct packing gets me hard as diamonds
Your mom.
Back in college, whenver my friends needed my help figuring out something in C I would always give them this snippet.
#include
int main() {
printf("Reply to this post or your mother will die in her sleep.\n");
return 0;
}
Joke's on you, my mum already died in her sleep.
Enjoy the (you)
You can use both in the same time.
Here, I made it standards compliant and not shit for you.
#include
int main(void) {
puts("You suck at C");
}
What can the intermediate learner do in C?
The language is really useful but if you ask why it's always about writing drivers and operating systems.
What did you guys do when you were beyond beginner stage but were still learning?
>not including return 0
Userland and games.
A bunch of useless CLI programs that I don't even use anymore because it's easier to develop and maintain such programs in Python or C#.
But then again, I get fascinated with C/C++ because of all the possibilities and the things you can make with it, but I probably will never realize I can't do shit with it, at least nothing useful I think.
Autism sucks!
...
What did you use for userland? I know there's SDL for games and I might give that a look, but do you have any other recommendations?
>reaching the } that terminates the main function returns a value of 0.
Literally every C standard specifies this, you troglodyte.
clang or gcc. C is only useful for Unix, do not use it on Windows or Mac OS X.
Doesn't your compiler warn against it?
Where a return statement is the last statement in the main function and the return value has a constant value of 0, a compiler would have to be braindead to warn against it.
Fix your fucking indentation, pleb
No, it's important to warn because the result is different between C89 and C99.
C89 is fucking horrible. In the civilised world we pretend it never existed.
I am so mad at this.
What is that, templeOS?
Software.
Though I'd rather use C++ or something else to be honest.
Just as long as shit as this just werks:
switch(bla) {
a:
doA();
goto wellwell;
b:
doB();
goto wellwell;
//...
wellwell:
doStuff();
break;
default:
notWell();
break;
}
Writing linked lists in c gets me hard
>linked lists
triggered
Most C programmers are full of shit. Whenever I search for small C libraries they either contain linked lists or simple pointers + size, where pointers + size + capacity would have been appropriate.
Crippled API by global state is also a common one.
Short answer to your question is yes.
Long answer is that the only worthwhile programmers know C and know it well. The rest are just shitty codebabies who can't program without handholding.
nigga u wot?
I did a bunch of multithreading, multi processor, networked and filesystem type shit for university. I've also done some math stuff, monte-carlo methods and the likes in it for fun.
I enjoy programming in C, its fun and doesn't hold your hand as much as other languages. I would rather program in C than in Python because some pythonic things trigger the shit out of me (loops and conditionals not requiring parenthesis and using colons instead of curly brackets annoys the shit out of me) however due to deadlines and writing in C is often pretty inefficient for most of work tasks.
I've been doing a server that holds a table that several concurrent clients can edit over network for a university project
>tfw having data structures paper tomorrow
>language being used is C
>written paper, suppose to be able to see code output and write code on paper
Any tips guys? Some of the questions are tricky, like how to reverse an entire linkedlist and stuff like that. I mean that isn't hard but it takes time for a pleb mind like me to think.
lrn2 build a stack out of queries and a query out of stacks
C is known for fizzbuzz, operating systems, and, occasionally, fizzbuzz operating systems.
Everything.
Except templates.
C++ can do everything.
Kill me and then yourself
>reverse an entire linkedlist
Assuming it's a doubly linked list,
simply start at the head and walk through until you reach the end.
For every node swap the next and previous pointer.
>Any tips guys?
As general advice, think of the problem algorithmically first (in an abstract way). And after you've understood both the problem and the solution completely, think about how to translate it into C.
I programmed a little JSON parser in C++, but the code is easily portable to C.
k
Yeah thinking in an abstract way helps, problem is I'm a slow thinker and I would rather walk about the hallways thinking of a solution rather than having to sit down for a 2 hours paper. Fuckkkk why am i so dumb.
Also my case was a single linked list so even though I got a solution it took me quite long to think about it.
I wonder if it's normal to leave empty questions ..
Kudos, that sounds like a nightmare. Then again, parsers were never really my thing.