C nyelv - videó leirata

C, a statically typed procedural programming language - famous for making the world go around. It's the language behind many tools we take for granted, like Windows, Linux and Mac operating system kernels; databases like MySQL; interpreters for languages, like Python; tools, like Vim, Git and countless others. It was created in 1972 by Dennis Ritchie at Bell Labs where it would be used to develop the Unix operating system. It would go on to become the mother of all languages, inspiring the synthax of C++, C#, Java, JavaScript, Pearl and PHP, just to name a few. It compiles directly to machine code. It requires minimal runtime support, but it's platform dependent, meaning the executable is designed to run on a specific operating system. It's a high level language designed for humans yet provides low level control over memory and hardware. There's no garbage collector, instead, your code needs to manage it's own memory. When you create a variable, it's assigned in addressive memory and you can store that address in another variable called the pointer. When the variable is no longer needed, you'll need to free it to avoid memory leeks. To get started, install a C compiler, a popular choice is the GNU C Compiler, or GCC. Create a file ending in dot C, include any libraries you plan to use, then add a main function to it. This is where your program will start executing. There's no function keyword and you notice how it returns an integer type. A return value of 0 means success while a return value of 1 is failure. There are only a few basic types in C. Create a variable by starting with the type, followed by a nem and a value. Use printFFFFFFFF to print the vaue to the standrad output or put an amperstand in front of it reference it's address in memory. There's no string type but instead char, which represents a one byte character stored as an integer. A string can be created with an array of characters. Each letter will have it's own memory address and be terminated by a Null character. Another approach is to start with a pointer by adding a star character in front of the type then we can allocate four bytes to it. Now assign a character to each index, ending with a null character to create a string. When you no longer need that memory allocated to your program use free to release it back to the computer's RAM. The language is procedural and does not support object oriented features although you can create complex data types using structs. Now compile your code to machine instructions for your operating system using the C compiler. This has been the C programming language in 100 seconds. Hit the like button and subscribe if you want to C more short videos like this and I will C you in the next one.