What is the difference between C and C++

Which is better to use?

What is the difference between C and C++

class, virtual, const, public, protected, private, template, friend, overloading, and name mangling.

Which is better to use?

In the context of programming your Arduino your question is irrelevant. Your sketch is always fed to the C++ compiler.

So really just the structuring and keywords are the only distinction; therefore, there is no difference between the two.
Does one work better than the other with certain types of hardware?

infinite4566:
So really just the structuring and keywords are the only distinction;

That's not what was said.

Does one work better than the other with certain types of hardware?

The hardware doesn't care, because it operates on some kind of machine language and it doesn't
matter what programming language that is compiled and linked from.

class, virtual, const, public, protected, private, template, friend, overloading, and name mangling.

What does all this mean?

Well, I could sit here and type out the lecture notes for three or four semesters of teaching programming,
or, on the other hand, perhaps not.

infinite4566:

class, virtual, const, public, protected, private, template, friend, overloading, and name mangling.

What does all this mean?

It means Google has a lot to say about this.

If you Google "C vs C++" you get almost 18M hits.... there's no shortage of discussion on the subject!

JFGI

Does one work better than the other with certain types of hardware?

Sort of. Some processors have excellent support for virtual method tables while other processors do not. Typically, virtual method tables are not used in C but they can be.

infinite4566:

class, virtual, const, public, protected, private, template, friend, overloading, and name mangling.

What does all this mean?

Most of the items are keywords present in C++ but not in C. The last two are concepts present in C++ but not in C.

Essentially, using the words in the list as keywords in Google searches will help you answer your question.

infinite4566:
So really just the structuring and keywords are the only distinction; therefore, there is no difference between the two.

That is hardly "no difference". C++ has classes, for one thing. And templates.

infinite4566:
Does one work better than the other with certain types of hardware?

The g++ compiler generates good code in either case.

I recommend you use Google a bit, this is a pretty general question.

really just the structuring and keywords are the only distinction

well, you could say THAT about the difference between Cobol and C...

C++ is a different programming language than C. Unlike most "new" languages, it was designed to be a sort of add-on to the C language. So (almost) any legal C language program is also a legal C++ program.
C++ add a bunch of features, many of which are not used much in the arduino environment. People have mentioned a couple of these, and they're complex enough that they're not easy to explain.

A C++ feature that shows up a lot, even in arduino code, is "polymorphism." This encompasses the idea of being able to define function whose "definition" can be different depending on the type of the arguments. So "print((int) 1);" and "print((char) 1);" call different code.

Some of the C++ features require resources and run-time libraries that don't exist for small microcontrollers like the AVR. Many of the advantages of C++ are going to be less apparent in small programs. My observation is that a lot of the purpose of "object oriented programming languages" like C++ stems from their ability to concisely define in libraries/classes many modern application concepts ("objects") like Windows and Mouse Buttons and so on. If you've ever looked into writing or using a GUI library in an older language, you run into the problems solved by C++ pretty quickly.

infinite4566:
Which is better to use?

What is better, a dog or a cat?

Which is better, a pick-up truck, or a sports car?

A violin, or a piano?