Difference between C & C++

Hi there
I just wanna ask a few questions,
Is there any thing in C that is not in C++?
If the answer is no.

Is there any thing that can be done by c can't be done by C++?
Is there any thing in C that is not in C++?

Yes.

Is there any thing that can be done by c can't be done by C++?

No.
Last edited on
Is there any thing that can be done by c can't be done by C++?

No.


It is incorrect answer because C++ is based on the C89 Standard while C is based on the C99 Standard. So there are things that can be done by C and can not be done by C++. Consider, for example, definitions of arrays with non-const expression for array sizes.
I interpreted his question to be "is there anything you can do with C that you cannot do with C++?", to which the answer is no.

Vlad has interpreted his question to be "is all C syntax also correct C++ syntax?", which is a different question.

Everything you can do with C, you can also do with C++; ultimately, you can just write assembler directly into C++, so you can make the processor do anything that you like.
Last edited on
Is there any thing that can be done by c can't be done by C++?

The answer to this question is the same for all Turing-complete languages.
Topic archived. No new replies allowed.