Taken from http://www.ocf.berkeley.edu/~wwu/riddles/cs.shtml
It looks very compiler specific to me. Don't know where to look for?
Simple enough.
#include <stdio.h>
int main(int argc, char ** argv) {
#ifdef __cplusplus
printf("C++\n");
#else
printf("C\n");
#endif
return 0;
}
Or is there a requirement to do this without the official standard?