Computer science students emphasize the importance of programming, especially the C language, to the point that the department is called “Coding Slavery”. C is still widely used because of its speed and efficiency, and it remains a fundamental language that requires a deep understanding and ability from programmers.
There is a joke among the computer science students. We joke that our department is not called the Department of Computer Science, but rather the Department of Coding Slavery. It’s a self-help humor that reflects the reality that computer science students face. The phrase captures their struggle, as programming is not just an academic study, but a skill that requires a lot of time and constant practice. Suffice it to say, the ability to code a program is very important.
In the 21st century, the computational speed of computers is increasing at a frightening rate. Nevertheless, computers are still just machines that move according to human commands, and the act of giving them commands, or coding programs, is still very important. To code, you first need to learn a programming language, and there are many of them. From the most basic machine language, which consists of only 0s and 1s, to JAVA, which is used to develop Android apps, there are a lot of languages to choose from. More than just a tool, programming languages are an essential way for developers to unleash their creativity and solve complex problems.
Even if you don’t know much about programming languages, you’ve probably heard of the C language. In fact, even I, who knew nothing about programming until I started college, knew the name of the C language, and it was the first programming language I learned. C is a programming language developed by Dennis MacAlistair Ritchie at Bell Labs in 1972. The programming language developed by Bell Labs before C was called the B language, after Bell’s letter B, hence the alphabetical order of the C language. As of 2014, it’s 32 years old, but it’s still one of the most popular programming languages in the world, along with JAVA.
There are many reasons why it’s still so popular despite being over 30 years old. The main reason why C is still widely used in the computer science community is because it’s so fast. In order to give commands to a computer in a language other than machine language, you need to convert it into machine language that the computer can understand. However, the C language is unique in that it can be read directly by the computer without any special steps. This kind of language is called a native compiled language. For example, a Korean person who is fluent in Japanese can understand Korean or Japanese as soon as he hears it, but English needs to be translated by looking it up in a dictionary. Similarly, a computer can recognize machine language and its native compiled language, C, right away, but other languages need to be translated into machine language by a compiler before it can execute commands. For this reason, C forms the core of modern computer systems, and its importance is not easily diminished.
Its speed is a great strength, but it also has its drawbacks. Unlike many modern programming languages, C doesn’t automatically support a number of features that make life easier for programmers. For example, JAVA, a popular programming language alongside C, has a number of application programming interfaces (APIs). APIs are a collection of pre-written functions for ease of programming, making the programmer’s job easier by making complex functions simple to use. However, the downside is that APIs take time to call and process. C, on the other hand, requires programmers to do more manual work because they have to program these tasks themselves.
This characteristic of the C language is a challenge in itself, but at the same time, it gives programmers more freedom. Because you’re in control of everything, you have the opportunity to deeply understand and optimize how your program works. This is one of the reasons why the C language still plays such an important role in computer science.
Now that you know a little bit about the C language, let’s explain how to code in C with a simple example.
#include
int main() {
printf(“Hello world!\n”);
return 0;
}
The above code is the code for a program that prints the sentence “Hello world!”, something that anyone who has studied C has probably written at least once. The #include at the top is the line that sets the header file for this program. A header file is a file that contains the grammar rules for the program, and stdio.h is the header file that contains the most basic grammar. Other header files include math.h, which contains math-related functions, and string.h, which contains string-related functions.
The int main() in the second line declares a new function. In C, to achieve the desired behavior, we need to implement it through a function. In this case, you need to decide the form of the result of the function’s calculation, the name of the function, and the values that are input from the outside when the function is started. The first int indicates that the value to be received after calculation is an integer, and main indicates the name of the function. The values in parentheses are the values that will be passed in at the start of the function, which are left blank because we don’t need any variables for this function.
Curly braces {} indicate the beginning and end of the function, with the content of the function in between. Here, we’re implementing something that prints “Hello world!” and ends the function, but you can add a lot more functionality if you want. For example, you can use conditional or looping statements to control the flow of the program, or arrays to manage data efficiently. This is a great way to practice the logical thinking required to go beyond simple output programs and actually solve complex problems.
There are many other programming syntaxes in the C language, including those described above, that can be used to implement even more complex functionality. Because of its simplicity and speed, C is used to implement the most basic functions of many different programs. If programming is the basis of computer science, then C is the basis of programming. It is fundamental for a computer science student to learn C and practice using it to become efficient in a variety of other languages.
After all, C is the basic compass for navigating the vast ocean of computer science. Becoming proficient in this language is not only about mastering programming skills, but also about gaining a deep understanding of the inner workings of computers and logical thinking. Many students will continue to use C to build their programming fundamentals and develop creative and innovative skills in the future.