Now a days Why do most companies prefer c++ over C

Go To Last Post
28 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi 

I have searched through a lot of job posting ads and found that most recruiters’ prefer C++ over C language in embedded system. I do not understand What is the reason that they are preferring projects in C ++?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Because C++ is a "better" language. It applies "object encapsulation" to basic C to make it more modular, testable and robust. It was developed some years after C first appeared and was therefore able to "fix" some of the things that could too easily lead to bugs in plain C.

 

Clearly you cannot be familiar with both C and C++ if you don't already understand what makes C++ a more desirable language. I'd suggest learning some of the basics of C++ to get a better understanding of why it is preferred.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 2


muke12 wrote:
What is the reason that they are preferring projects in C ++?

It is simple -- those that want to gain/retain more power over others decree that something newer (newer than perfectly functional [and at this point traditional] procedural languages) be used.  Like the pointy-haired boss, they can spew terms like "polymorphism" and feel cool.

 

...and https://www.google.com/search?q=...

 

Acolytes and minions can be mustered to devote years -- nay, decades -- to try to coerce simple tasks to be done in a manner approaching the simplicity and efficiency of more traditional approaches.  [ref.: ralphd]

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

Last Edited: Mon. Mar 30, 2020 - 07:53 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 3

muke12 wrote:
most recruiters’ prefer C++ over C

laugh laugh laugh laugh laugh laugh 

 

most recruiters wouldn't know a C++ if their inheritance depended upon it!

 

https://www.avrfreaks.net/commen...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Mon. Mar 30, 2020 - 08:12 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Mon. Mar 30, 2020 - 08:15 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 2

Tell them C++ is old hat and you have moved on to using PL/1 

 

Recruiters generally prefer you to not ask a lot of questions....just take the job so they can collect.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You'll be saying C++ is for Quiche Eaters next ...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 2

awneil wrote:
if their inheritance depended upon it!

I'm glad I was not drinking something at the time I read that!  surprise

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

my projects: https://github.com/epccs

Debugging is harder than programming - don’t write code you can’t debug! https://www.avrfreaks.net/forum/help-it-doesnt-work

Last Edited: Mon. Mar 30, 2020 - 11:34 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 2

Well, "C++ is a superset of C, so anyone who knows C++ can also program in C."
Not true, in many ways, but exactly the sort of thing that recruiters and/or HR departments would think.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

muke12 wrote:
in embedded system

You keep saying that:

 

https://www.avrfreaks.net/forum/kernel-programming-experience

 

https://www.avrfreaks.net/forum/do-you-have-experience-device-driver-development

 

as if "embedded system" had some single, strictly well-defined, precise meaning.

 

Of course, it is not at all !

 

"embedded systems" covers a vast spectrum from tiny little processors with only a few hundred bytes of memory right up to huge systems running major operating systems like Linux.

 

Clearly, the choice of programming language, etc, will vary widely across that spectrum.

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Tue. Mar 31, 2020 - 07:49 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I work in embedded systems and I work (almost) exclusively in C++. It's true that I use GHz, Octo-core processor surround by advanced vision processors - but it's still "embedded" (this goes under the bonnet of your car and once there the code will not change).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 2

clawson wrote:

I work in embedded systems and I work (almost) exclusively in C++. It's true that I use GHz, Octo-core processor surround by advanced vision processors - but it's still "embedded" (this goes under the bonnet of your car and once there the code will not change).

 

And at the other end of the scale I'm currently sitting here writing code, in plain old vanilla C,  to go in a tiny4313, running at 7.4MHz, which scans a 16-key keypad and outputs to an I2C lcd display and a serial port. Likewise, once shipped it will never change.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

Last Edited: Tue. Mar 31, 2020 - 09:58 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 2

clawson wrote:
it's still "embedded" 

Absolutely.

 

But it's a far cry from the humble 8-bit AVR - where the are people still debating whether 'C' is worthwhile ...

 

Are there still people making 4-bit micros ... ?

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorry - that image is too small to read.

 

frown

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

https://www.google.dk/url?sa=i&u...

 

But it kind of look too even (don't expect 16bit to be that big)

 

I would expect that most "small" micros today are pad limited, so no extra cost to make a bigger micro ( >4 ) bit. But there would be many cheap very high volume (real ROM mask (no otp or flash)) productions going on. 

 

Add

It's 20 years since I last programmed a 4 bit micro (a samsung otp)

Last Edited: Tue. Mar 31, 2020 - 11:54 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


Another attempt to paste a "big version"....

 

 

is it me or does that REALLY shows that 4 bit seems to be growing faster than 8 bit ??

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

each has about 20% of market share. Interesting plot. This means that all of them are utilized in their suitable areas.
 

work in progress...

Last Edited: Tue. Mar 31, 2020 - 01:38 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


 

Hmmm ... a google image search for that image gives this:

 

 

 

 

So I think the whole thing may be spurious?

 

Probably you have to cough up the cash for the report to see the real graphs ?

 

frown

 

EDIT

 

I also had to take a 2nd attempt at pasting the image

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Tue. Mar 31, 2020 - 01:43 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sparrow2 wrote:
20 years since I last programmed a 4 bit micro

Going on 30 for me - NEC uPD75..., IIRC ...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

that's a lot of time! Does it still make fun for you to work in the field,  or do you still actively developing?

work in progress...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just had a look at aliexpress to see

 

And they have this for $0.1

 

SD6832 DIP8 In Stock 4BIT MICROCONTROLLER

 

I don't know anything about the chip other than it is :

 

PWM+PFM controller with built-in high- voltage MOSFET

But this one of the things that keep the count up :) 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Amazed that there are still 4-bit applications! Next thing, you-all will be telling me that bit-slice is the next big thing! Anyone for a 19-bit "micro"?

 

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Let them know you can also do assembly...they may be impressed, because it has become a rarer commodity.   Too many "PC folks" jump in not understanding what is really going on & are "lost" without a library to lean on.

Not saying a library isn't useful or needed, but please be able to do basic things without one.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Employers prefer C++ over C because Arduino uses C++ and they have finally realized that they can hire competent Arduino programmers for 1/10th of the cost that they pay C programmers and still get the about the same amount of programmer productivity.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Simonetta wrote:
Employers prefer C++ over C because Arduino uses C++

laugh laugh laugh laugh laugh laugh laugh laugh laugh laugh laugh laugh laugh laugh laugh laugh laugh laugh laugh laugh laugh 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I looked at the datasheet but didn't see any indication that the SD6822 is a microcontroller of any type.  Sure there are a lot of factories in China that will sell you a box of left-over chips for a penny each.   But don't expect them to be able to tell you what they are, what they do, or if they are defective, counterfeit and/or maybe completely unmarked.   Ebay has the SD6822 selling for about a dollar/pound/euro a chip.

 

There are twenty-cent microprocessors available.  They sometimes have ADCs and high-current I/O pins.   They are usually One-Time-Programmable and have custom instruction sets with complex and underdocumented programming procedures.