Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

The difference between the C language and C


May 30, 2021 Article blog


Table of contents


It is one of the three major OOP (object-oriented programming) languages (C, Java, C) and some of the differences between it and C.

C language was born very early, the goal of C language is easier to use than assembly, without losing the ability to express assembly. S o the C language can be thought of as an "advanced assembly" language. T he source code for the C language can basically correspond very easily to assembly code and can be supported by no runtime environment. C characteristics, simple and easy to compile, flexible close to the bottom. S o until now, some of the software that needs to deal directly with hardware has been written in C. In short, the C language is simple to write, closer to the bottom, and intuitively manages data storage.

There is a high level of abstraction and basically only one (object-oriented), rich runtime support (garbage collection, etc.), and rich class libraries. S o it is easy to learn, easy to use, while taking into account the operating efficiency, as far as possible optimization. S imilar to Java, the compiled result is not machine code, but meta-instructions running in a virtual machine. It gives more consideration to security, does not have pointers, can not directly manipulate memory, automatic memory management.

The most intuitive differences are: there are no pointer types, memory is automatically managed; The failure of the case statement, unless the case statement is followed by a space, executes the previous case statement and stops executing the case statement that follows even if there is no break; when the array is defined in C, the array length can be a variable; and the array length defined in the C language can only be a constant expression, dynamic memory allocation requires the molla function;

In general, the C language is more basic, a lot of things need their own DIY, but extremely flexible, very powerful, the essence of which lies in pointers, direct management of data storage, process-oriented programming, many operating systems and system software are written in C language; I t's best not to use a pointer. C : What is a pointer?

=================================================

First, the difference between the degree of difficulty.

It's an easy-to-use product in the .net framework, but what's developed now needs to be installed in the runtime for others to use. c Language is an ancient and difficult language that may be used more in embedded systems, and the university will have this course. Related to the c, can do the system's underlying development, it is not easy to master.

Second, the content of the difference.

The C language is process-oriented, unmanaged programs are developed, and compiled into exe is a binary executable, not cross-platform. Object-oriented, developing a managed program, compiled into exe is an intermediate language that requires a secondary dynamic compilation on the .NET platform before it can be executed across platforms.

Third, the difference in characteristics.

The C language was born very early, when people were generally used to writing software in assembly language, and there is no uniform, common operating system, basically software is written from 0. I t's a safe, stable, simple, elegant, object-oriented programming language derived from C and C. It removes some of their complex features while inheriting the power of C and C.

===========================================================

C: Process-oriented, syntax is too cumbersome, but c is out of reach of other high-level languages in terms of underlying programming of hardware and flexibility in memory management.

A pure object-oriented (much like java) is one of the main forces of ms .net framework, whose code runs safely, with no pointers and references, and garbage collection mechanisms like java.

There is basically no difference in grammar, first there is no need to do much research on pointers, then there is no difference in the others, etc. It can be said that it is not one direction.

The development environment and the development language are also two different concepts

There doesn't have to be a basis for learning the C language, but if you've learned C, it's more of a success because there's a lot of grammar going on between them. As a beginner, there's no need to learn the C language first, you just need a complete tutorial on C.

It is recommended here that the basic C#good lessons: C?getting started manual, C?micro-courses