I would like to know what are the uses of C and C ++ languages ​​and for which platforms do they most often use them?

Closed due to the fact that the issue is too general for participants MSDN.WhiteKnight , 0xdb , aleksandr barakin , Kromster , Enikeyschik December 3, '18 at 14:46 .

Please correct the question so that it describes the specific problem with sufficient detail to determine the appropriate answer. Do not ask a few questions at once. See “How to ask a good question?” For clarification. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • 2
    C - for almost every conceivable and unimaginable platform. Pros - a little bit already. - KoVadim
  • 3
    @KoVadim, could you answer in more detail? The question is, in fact, quite interesting, both for beginners and experienced programmers who do not have serious programming experience in C / C ++. - Zowie
  • one
    @KoVadim, annoyingly, I expected at least some certainty in the answer, but, as a result, I got even more uncertainty ... Especially "any language can be used in many cases", yes, it is, but here "The scope of C and C ++ "? :) - Zowie
  • 2
    it's easier to say in my opinion where C and C ++ are not used ... so to say go from the opposite :) - ProkletyiPirat
  • one
    @klopp, is there really an interpreter (or native compiler) that appeared in browsers C with access to the system calls of the client OS? - avp

5 answers 5

These languages ​​are used where you need maximum speed, saving memory and "proximity" to the gland. This especially applies to C. With the ++ level a little higher and the programs on it have resource requirements a little more.

  • eight
    Aga C is a macro assembler that considers itself a high-level language. C ++ is an advanced macro assembler that considers itself a high-level language ... - alexlz
  1. For very serious projects, the development and use of which is carried out for several years.

  2. For projects that use their own protocols, formats, models and other forms of data interaction.

  3. For solutions requiring a high level of reliability. When every "byte" is under control.

  4. For solutions requiring high performance.

  5. In the absence of ready-made open or closed engines in a particular area of ​​development, or dissatisfaction with them.

  6. To learn the fundamentals of imperative programming.

  7. For development in an environment that supports only these languages. (For example, game consoles)

  8. For projects, the lifespan of which should exceed 10 years, and therefore requires a reliable development language that will definitely be relevant in the future (for example, the physx physics engine that has experienced several major refactorings. Initially, it was not so popular due to the special performance requirements for time, but the developers were confident that in the future it will be relevant for mass use, in cases of productivity growth)

In general, in almost any large project, the central logical core of the software package will function in one of these languages.

Often: - networks. protocols. - server side of various services. - games. - application interface for working with hardware devices. - any performance demanding components.

Example:

Video player (media player).

Buttons, event handling, settings - all this can be created using an ordinary high-level language.

But if you need to load the contents of the video file in parts, then quickly add effects to the video, transcode to another format, and play it on the screen, you will have to use C.

C ++ seems to be there, but to meet the library, which is based on STD-STL, is a great success. Everywhere they say "written in C + +", but in fact C with the addition of a pair of classes.

  • 3
    1. I think this is not an indicator, you can write a serious project for a long time in almost any language and use it for a long time. 3. The need for control over each byte does not imply high system reliability. Rather, in order to ensure high reliability, we need high professionalism of the programmer. - insolor
  • 1. At the expense of "almost any" disagree. If the language is widely supported by the public concerned or a large commercial corporation, then yes you can be sure of it. Language D. At first, I made so much noise: "Replacement of C ++!". But I could not stand the real test of time. News March 1, 2013 on the site dlang.ru "All of us are interested in this language by definition - otherwise we would not have been here. And we ..." And how can you plan a serious project if you are not sure that in windows 2020 there will be a development environment for this tongue? Stay in 2020 on windows 7 - manking
  • one
    In my opinion - on the contrary, the need to spend your attention on each byte means less system reliability. Systems that, without the explicit intervention of a programmer, "do everything right" are more reliable. - VladD
  • 2
    @manking And windows 2020 will be? - alexlz
  • 3
    @manking I read statistics a decade ago. The leader in scientific and technical applications is C ++, in business applications is java. But the statement "industry is stable" is too bold. The economy is becoming unstable, and overfed with IT money cannot be stable. More correctly, probably, "the industry is still stable." But this is not for long. The situation is now changing very quickly. One Cyprus is worth something. - alexlz pm
  1. C ++ has a compiler on all popular platforms, and there is an ide for it
  2. c ++ is used wherever possible (you can even write cgi scripts for the web on it)
  3. c ++ was recognized to replace the assembler language and was scheduled for 100 years of working with it
  4. It is often used in commercial projects. It has the highest speed.

In general, I think there are few competitors in the system programming area equal to this language.

ps: the ++ language is constantly evolving, and this is already a huge plus

  • 2
    And now everything is the same, only without ++ - skegg
  • 2
    quote from the tutorial C ++. DO YOU NEED TO STUDY FIRST LANGUAGE WITH? Many have a question: “Since C ++” is a continuation of C, you may need to master C from the beginning? ”Straustrup and most other programmers using C ++ consider it better not to do it. C is based on the concept structural programming, and C ++ is completely object-oriented.
  • 2
    @mikillskegg This sin you will not atone. And about the Basic still wrote Dijkstra (or about the Fortran?). Conclusion: You are hopeless. - alexlz
  • 2
    @alexlz, oh, oh, and BASIC, and FORTRAN, too, are on my list of sins! - skegg
  • 3
    @mikillskegg alas for us (started too - with assembler for one old architecture and Fortran-2). Although, they say, you can get rid of the curse by drawing in the UML class diagram for "HelloWorld!" (at least 50 classes) or by composing the word "eternity" from the letters "o", "a", "f", "p" ... - alexlz

Guys! You forgot about D Language ! Yes, development tools adequate for him are few, but he is cool. Compile everything into native code, allows you to write software cross-platform, has a very nice and simple syntax. Allows you to manage memory manually or automatically (there is a garbage collector).

Last time I try to get acquainted with this language in my free time. So far I like him.

ps: // si, si ++ now need to be used when writing drivers, some low-level programs, and applications that need maximum performance (read games, and others like them). For the web, the desktop can be used, but at the present time, when scripting languages ​​are actively developed and developed, and languages ​​like C #, java, there is no sense in these areas of ++ even more - it will be more expensive. Firstly, because development in C / C ++ is more difficult, and then after a few years of support, this project will turn into a poop that will be cheaper to rewrite.

Do not go on about everyone, have your opinion ! Try these languages ​​yourself, and decide whether you need it or not. Try alternative languages ​​compiled into native code, compare ease of use of languages. Do not be afraid to experiment !

  • one
    About D is not forgotten, it was mentioned. > Do not be afraid to experiment! Many who are just starting out are interested in this question. Because you need to master the most advanced technology and / or the coolest language. At the same time, how to learn how to program them doesn’t care at all, but there’s very little time, you need to hurry up and try once :) - user6550

To program iron