Puzzling Question

Comments

: I faced a very puzzling question. : : "Is there a program which runs in C but not in C++?": I was taught that C++ is a superset of C, so any program written in C should also run (or at least be compilable) in a C++.

: : I faced a very puzzling question. : : : : "Is there a program which runs in C but not in C++?": : : I was taught that C++ is a superset of C, so any program written in C should also run (or at least be compilable) in a C++.: wonder when or if they will save us all and make it one language

: : : I faced a very puzzling question. : : : : : : "Is there a program which runs in C but not in C++?": : : : : I was taught that C++ is a superset of C, so any program written in C should also run (or at least be compilable) in a C++.: : : wonder when or if they will save us all and make it one language: You could say that C++ is both so, then it is one language...

: : : : I faced a very puzzling question. : : : : : : : : "Is there a program which runs in C but not in C++?": : : : : : : I was taught that C++ is a superset of C, so any program written in C should also run (or at least be compilable) in a C++.: : : : : wonder when or if they will save us all and make it one language: : : You could say that C++ is both so, then it is one language...: This question was given by an interviewer from a software co. My friend who faced for simply freaked out by the quyestions he made.

: : : : : I faced a very puzzling question. : : : : : : : : : : "Is there a program which runs in C but not in C++?": : : : : : : : : I was taught that C++ is a superset of C, so any program written in C should also run (or at least be compilable) in a C++.: : : : : : : wonder when or if they will save us all and make it one language: : : : : You could say that C++ is both so, then it is one language...: : : This question was given by an interviewer from a software co. My friend who faced for simply freaked out by the quyestions he made.: I got it!

Look at this definition I got from my book: (translated from swedish)In ANSI-C can a global name be declared multible times, it can only be declared one time in C++

In ANSI-C you can use void * on the right side of an asignment.

In ANSI-C is it possible to skip a initiation, it isn't allowed in C++.

: : : : : : I faced a very puzzling question. : : : : : : : : : : : : "Is there a program which runs in C but not in C++?": : : : : : : : : : : I was taught that C++ is a superset of C, so any program written in C should also run (or at least be compilable) in a C++.: : : : : : : : : wonder when or if they will save us all and make it one language: : : : : : : You could say that C++ is both so, then it is one language...: : : : : This question was given by an interviewer from a software co. My friend who faced for simply freaked out by the quyestions he made.: : : I got it!: : Look at this definition I got from my book: (translated from swedish): In ANSI-C can a global name be declared multible times, it can only be declared one time in C++: : In ANSI-C you can use void * on the right side of an asignment.: : In ANSI-C is it possible to skip a initiation, it isn't allowed in C++.: : There's some more but this should be enought.: : Happy coding wishes: the one and only: [b]Niklas Ulvinge[/b] [white]aka [b]IDK[/b][/white]: : Thanks. It was a really really great suggestion.