tags:

views:

155

answers:

4
+5  A: 

No, it isn't.

SLaks
+8  A: 

Exact compatibility issues between C and C++.

Ugo
A: 

Almost. Its as much as possible backwards compatible, but some behaviors were changed.

The devil is in the details. e.g. sizeof('x') behaves differently in C and C++.

Eric
+1, "as much as possible" means no, but it is an important distinction, because this is definitely a goal of the C++ standards committee.
Merlyn Morgan-Graham
"As much as possible" is blatantly wrong. There's no reason for `char *s = malloc(10);` to fail in C++, but it does. C++ has many more such cases of gratuitous breaking of proper C code.
R..
+1  A: 

No, not exactly. There are few minor differences, but I don't have a link to the resource on this PC. This article might have something http://www2.research.att.com/~bs/examples_short.pdf

Basically, there are few things that most likely will be supported by compiler extensions, but you can run into problems as well.

Madman