Can C do everything that C ++ can do


C as a simplification of assembler

C differs from C #, Java, and PHP in that it is designed closer to the machine - understanding C helps to understand how a computer works in the first place. It is not necessary to learn assembler for this. C is a (significant!) Simplification of assembler, but still so close to the machine that there is almost no loss of speed when executing a program. You can also use C to instruct almost everything important that the machine is capable of doing. Only experienced programmers can write assembly language routines that are slightly faster than a well-written C program. As a rule, compiler developers know more strategies for delivering the fastest translation from a source text.

So C is ideal for training in understanding how programs really work. It serves as a good basis for learning another programming language that supports object-oriented programming - for example C ++.

Maybe you prefer to start straight away with C ++?

The basis of many modern programming languages, such as C ++ and C #, Java and PHP, is the syntax of the C programming language. Although C was developed as early as 1972, many constructs are so fundamental that their syntax has not been changed, or only very slightly, in subsequent languages.

C is a subset of C ++. Almost everything that applies to C also applies to C ++. If you want to learn how to program C ++, you have to learn the same basic constructs that you use in C. The same applies to languages ​​such as Java and C #.

"C works with insecure pointers"

Java, C #, and PHP work less obviously with pointers than C or C ++ - but they use them the same way. Pointers are a popular source of errors, but they are essential to writing meaningful programs. Pointers are clearly named by name in C and C ++ and identified in the source text so that you can learn how to use them. You can do more with pointers in C, so you can make more mistakes. Pointers are a normal tool in programming, meaningful programs without pointers are almost impossible. They are, however, they are not magic either. Since they point to a (storage) address, you can think of them as an envelope, where the recipient is also noted as the address that shows where the letter should go. So anyone who can send mail is already familiar with the concept.