Open Source Community

M

Malcolm

Keith Thompson said:
Yes, yes, we've all heard the standard Microsoft-bashing. Whether we
agree with it or not, it's off-topic here -- and frankly, it would be
boring even if it were topical.
I love Microsoft jokes, but only what CS Lewis called "jokes proper".

Eg what are these?

in 1 1, output 1
in 1 0, output 0
int 0 1, output 0
in 0 0 output 0
AND gates

and these?
in 1, 1, output 1
in 1, 0, output 1
in 0, 1, output 1
int0, 0, output 0

OR gates

and these
in 1, 1, output 0
in 1, 0, output 1
in 0, 1, output 1
in 0, 0, output "This computer has performed an illegal operation?"

Bill Gates.
 
J

Jordan Abel

You can do anything in C - the real problem is that people do just that,
i.e., use it for everything.

Given that you can't do it without C [though you can factor large
composite numbers whose factors are large primes, of course], I suspect
you probably can't do it with C either.
 
J

Jordan Abel

Afifov said:


The only return values from main() that have portable semantics are 0,
EXIT_SUCCESS, and EXIT_FAILURE. Where did you get -1 from?

perhaps that is his system's definition of EXIT_FAILURE

I suspect it would be legal according to the letter of the standard for
EXIT_FAILURE to be -1, EXIT_SUCCESS 1, and the implementation-defined
interpretation of exit values to be that positive numbers are
successful, negative ones are failed. This is certainly not the
interpretation used on unix systems, or on windows systems [on both, the
exit status may be an integer from 0 to 255, and for exit(n) is n&255
EXIT_SUCCESS is 0, EXIT_FAILURE 1 on unix - i don't know how these are
defined on windows]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top