|
Posted by Jasen Betts on 02/17/06 20:34
On 2006-02-16, marboti@gmail.com <marboti@gmail.com> wrote:
> http://www.testyourabilities.com/it/
> IT tests. SQL, XML, ASP.NET, C, C++, C#, VB.NET, HTML...
more than that, it tests your eyesight... the font they use is so small that =
looks like a fat -
and some of the questions are nonsense.
For example:
..Question 13 of 27 Time elapsed: Time remaining:
..
..What is the output of the following C code fragment?
..
..#include <stdio.h>
..
..main()
..{
.. int value1 = 14, value2 = 5;
..
.. printf("The value %d divided by %d is %d\n", value1, value2, value1
../ value2);
.. printf("The value %d divided by %d is %f\n", value1, value2, value1 /
..value2);
..}
..
.. A The value 14 divided by 5 is 2
.. The value 14 divided by 5 is 3.000000
..
.. B The value 14 divided by 5 is 2
.. The value 14 divided by 5 is 2.800000
..
.. C The value 14 divided by 5 is 3
.. The value 14 divided by 5 is 2.800000
..
.. D The value 14 divided by 5 is 2
.. The value 14 divided by 5 is 2.000000
..
.. E The value 14 divided by 5 is 3
.. The value 14 divided by 5 is 3.000000
..
.. Select one of the answers.
the correct answer is that it invokes undefined behavior
here's what I get from running that code:
The value 14 divided by 5 is 2
The value 14 divided by 5 is -1.289608
--
Bye.
Jasen
[Back to original message]
|