Why Start Programming with C Language?

Click the blue text
Why Start Programming with C Language?
Follow us

Due to changes in the public account’s push rules, please click “View” and add “Star” to get exciting technical shares as soon as possible

Source from the internet, please delete if infringed

Why Start Programming with C Language
Many friends start programming with C language, but do you have to start with C language? Can you start directly with JAVA?
Yes! Before choosing a programming language, you need to clarify your programming goals. Do you have a specific product you want to develop?
For example, some programmers want to create a Java game, so they choose Java. Therefore, the choice of language to some extent depends on your programming goals.
C language is now very mature; its various syntax rules and concepts have been established and have had a significant impact on many current languages. Thus, as a low-level language, it is the first choice for many friends when starting programming.
Every language has its pros and cons, and C language is no exception:
Why Start Programming with C Language?
Advantages of C Language
The advantages of C language are three:
First, less code
  • Fast execution speed
  • Powerful functionality
  • Let’s first understand
    First, C language has very little code. What does this mean? It means that if you want to achieve the same functionality, the program written in C language will take up very little space, while using other languages will result in a larger size.For example, Microsoft Word and WPS are both office software with similar functions, but the installation file for WPS is only about 50MB, while Microsoft Word’s installation file exceeds 500MB, and some even approach 1GB. The reason is that WPS’s core is written in C language.
    Why Start Programming with C Language?
    The second and third advantages of C language are its fast execution speed and powerful functionality. We can explain this with an example. There are three major operating systems in the world: the UNIX operating system is written purely in C language; the Windows operating system’s kernel is also written in C language; and the Linux operating system is still written purely in C language.
    All three major operating system kernels are written in C language. Why use C for writing? Because C language is the fastest. All software in a computer runs on the operating system, and if the operating system is slow, the software running on it will be even slower. Moreover, all hardware in a computer is controlled by the operating system.
    Why Start Programming with C Language?
    For example, you can create a new Word document, which means a file is generated on the hard drive. However, you do not directly control the hard drive; we use functions like “right-click” provided by the operating system to create files. In other words, the operating system provides us with an interface, or a way to operate, through which we can delete files, create new files, open files, or modify files.
    Therefore, the operating system is very important, as all hardware is controlled by the operating system. Such an important thing can only be written in C language, so C language is very important. Why can only C language be used? First, C language is fast enough; second, C language can access hardware, making it powerful.
    Why Start Programming with C Language?
    Why can’t Java be used? First, Java is too slow; second, Java language does not have pointers. Without pointers, hardware access is impossible, making it insufficiently functional. What pointers are will be discussed later; they are a very important part of C language.
    Disadvantages of C Language
    C language also has its drawbacks:
    There are three drawbacks:
    • High danger.
    • Long development cycle.
    • Poor portability.
    Let’s first look at the first point. If you write the same program, it will throw an error in Java, but not in C language. Why?
    Because the design philosophy of C language is:You can write your program however you want, as long as your writing is not too outrageous, it is considered to have a special meaning and can pass. But Java does not allow this: as long as your writing is ambiguous, or not well written, it will throw an error.
    For example, in C language, you can assign a floating-point data to an integer variable, and the compiler will only warn because precision will be lost, but in Java, this will throw an error; it prohibits you from writing this way in syntax. Therefore, different languages handle the same problem differently.
    Why Start Programming with C Language?
    What is the result of this? Because ambiguous programs can also pass, many vulnerabilities will arise, and hackers often exploit these vulnerabilities to attack. Therefore, C language is relatively dangerous. This is also why C language is considered difficult to learn; after you learn it, writing a program can easily be wrong, but it is hard to detect. So earlier we said that C++ has upgraded C language in terms of safety.
    The second is its long development cycle. Because C language is a procedural language, one characteristic of procedural languages is that when writing large projects, it is prone to “crash”. When the code reaches 100,000 lines, it is easy to crash and various inexplicable errors can occur. At this point, another approach is needed to redesign the entire program framework, i.e., using an object-oriented design. This is also why C language is not as popular as Java now.
    Why Start Programming with C Language?
    The third drawback of C language is poor portability. This is mainly in comparison to Java. Java’s portability is too strong, making C language’s portability seem weak. What is portability? It means that Java programs can run on any machine, and the results are exactly the same. However, C language cannot guarantee this; a C program may not run on other machines. Even if it can run, the results may not be the same.
    
    If you are over 18 years old and find learning 【C language】 too difficult? Want to try other programming languages? Then I recommend you learn Python, currently valued at 499 yuan, the zero-based Python course is temporarily free to receive, limited to 10 places!
    
    
    
    ▲ Scan the QR code - Free to receive
    
    
    
    
    Why Start Programming with C Language?
    Click to read the original text for more

    Leave a Comment