I\'ve found this C program from the web:
#include
int main(){
printf(\"C%d\\n\",(int)(90-(-4.5//**/
-4.5)));
return 0;
}
>
Because //
comments only exist in C99 and later standards, the code is equivalent to the following:
#include
int main (void)
{
int vers;
#if __STDC_VERSION__ >= 201112L
vers = 99; // oops
#elif __STDC_VERSION__ >= 199901L
vers = 99;
#else
vers = 90;
#endif
printf("C%d", vers);
return 0;
}
Correct code would be:
#include
int main (void)
{
int vers;
#if __STDC_VERSION__ >= 201112L
vers = 11;
#elif __STDC_VERSION__ >= 199901L
vers = 99;
#else
vers = 90;
#endif
printf("C%d", vers);
return 0;
}