Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What type of programs are C/C++ used for now? [duplicate]

Possible Duplicate:
in which area is c++ mostly used?

I started off with C in school, went to Java and now I primarily use the P's(Php, Perl, Python) so my exposure to the lower level languages have all but disappeared. I would like to get back into it but I can never justify using C over Perl or Python. What real-world apps are being built with these languages? Any suggestions if I want to dive back in, what can I do with C/C++ that I can't easily do with Perl/Python?

like image 636
Ryan Detzel Avatar asked Jun 11 '10 20:06

Ryan Detzel


People also ask

What programs is C used for?

C programming language is a machine-independent programming language that is mainly used to create many types of applications and operating systems such as Windows, and other complicated programs such as the Oracle database, Git, Python interpreter, and games and is considered a programming foundation in the process of ...

What is C used nowadays?

It is used in developing an operating system. Operating systems such as Apple's OS X, Microsoft's Windows, and Symbian are developed using 'C' language. It is used for developing desktop as well as mobile phone's operating system. It is used for compiler production.

Is C still used in 2022?

Let's say you are new to programming. There are a variety of languages to choose from. Many people will recommend Python as your first language because of its short syntax which makes it very attractive.

What is C# used for?

C# (pronounced "See Sharp") is a modern, object-oriented, and type-safe programming language. C# enables developers to build many types of secure and robust applications that run in . NET. C# has its roots in the C family of languages and will be immediately familiar to C, C++, Java, and JavaScript programmers.


3 Answers

To borrow some text from the answer I had for another related question:

  1. Device drivers in native code.
  2. High performance floating point number crunching (i.e. SIMD).
  3. Easy ability to interface with assembly language routines.
  4. Manage memory manually for extended execution runs.
like image 149
Amardeep AC9MF Avatar answered Oct 06 '22 11:10

Amardeep AC9MF


Most of my work has been C and C++. I studied computer engineering in school and worked with embedded devices. My Master's degree had an emphasis in graphics and visualization. One of our visualization apps was written in Python, but for the most part, graphics demands C/C++ for the speed. I now work with embedded devices running Windows Mobile and Windows CE - all C++, though you can do a lot with C#. I previously worked in simulations, which was all C++ code on the backend. C++ is still king for time-sensitive IO, embedded applications, graphics and simulations.

Basically, if you need tight control of timing, you go lower level. Or if you need light-weight (ie, small program size, small memory footprint)

like image 26
Eli Avatar answered Oct 06 '22 11:10

Eli


Somewhat unscientifically I took a look on Sourceforge and the top twenty projects/language break-down is currently thus:

  • Java(43,199)
  • C++(34,313)
  • PHP(28,333)
  • C(26,711)
  • C#(12,298)
  • Python(12,222)
  • JavaScript(10,307)
  • Perl(8,931)
  • Unix Shell(3,618)
  • Delphi/Kylix(3,353)
  • Visual Basic(3,044)
  • Visual Basic .NET(2,513)
  • Assembly(2,283)
  • JSP(1,891)
  • Ruby(1,731)
  • PL/SQL(1,669)
  • Objective C(1,424)
  • ASP.NET(1,344)
  • Tcl(1,241)
  • ActionScript(1,164)

Perl + Python together still total less than C alone. I have no idea why Java is so high, I know of no single Java developer and have not seen a single Java project, but I am sure someone is using it! For probably the same reason, you are not seeing much C/C++, you are just not working in a domain where it figures highly. I work in embedded systems where C and C++ are ubiquitous and Python comes nowhere. Different languages are encountered to different extents in different worlds.

You ask what you can do with C/C++ that you cannot do easily with Perl/Python; well the answer is plenty, real-time embedded systems for one; but if that is not what you want/need to do, then there is no reason to. On the other hand I might ask the reverse; I'd use C++ for things you might use Python for, simply because for me it would be easier and quicker (than learning a new language and getting the tools working)

like image 29
Clifford Avatar answered Oct 06 '22 11:10

Clifford