How the hell do I get from printf("Hello world"); to this?
Perfect hello world in C!
Videos
Hi everyone!
I've done some C in high school and I've been doing some Python lately and also learning Linux System Administration.
I don't have a CS degree, but I'm really interested in this stuff, I love it and I would like to some day actually contribute code to open-source projects in my spare time.
Recently I read a tip for learning better programming and UNIX/Linux skills that said people should try to rewrite basic commands in Linux in C.
So, anyway, I took a look at this code https://github.com/wertarbyte/coreutils/blob/master/src/cat.c and honestly I got a bit discouraged. How the hell do I get from stuff I learned in my C textbook to this level? From where do I learn these things? Was there ever some kind a manual written for this purpose or am I supposed to figure everything out by myself? I don't want to come off as rude or anything, I'm just feeling a bit overwhelmed, I guess, and I would appreciate some basic guidance.
Thanks in advance!
If anyone disagrees about this hello world code being perfect they are objectively wrong.
Prove me wrong so i can ingore your cries, womp womp.
#include <stdio.h>
#define args int argc, char** argv
int main(args)
{
printf("%s\n", "Hello, world!");
return 0;
}