HOME
Mcq Modul 06
Mcq Modul 06
Correct ans
Question 1
The length of a double typed variable:
is hardware dependent
Correct!
is defined by IEEE754 standard
is defined by the "C" language standards
is user defined
Question 2
1 / 1 pts
Removing the letter 'f' from both literals used in the following expression:
printf("%f", 43210.f + .56789f);
will cause compilation error
will change the value printed to stdout
Correct!
is illegal
won't change the value printed to stdout
Question 3
1 / 1 pts
The three parts of a float values are deployed in the following order:
exponent, sign, significand
sign, exponent, significand
exponent, significand, sign
Correct!
sign, significand, exponent
Question 4
1 / 1 pts
The number of significant digits stored in a float value
is the bigger the smaller is the value
changes randomly
Correct!
depends on the value's precision
is the smaller the larger is the value
Question 5
1 / 1 pts
If you put a pin in a random place of number line, the distance to closest representable float value is:
Correct!
not greater than half of ULP
equal to ULP
greater than ULP
equal to half of ULP
Question 6
1 / 1 pts
Dividing non-zero float value by zeroed float value produces:
a NaN result
a -inf result
abnormal program termination
Correct!
a +inf result
Question 7
1 / 1 pts
Assuming that the STDC FENV_ACCESS is et ON, the result of the following expression shown on 5 digits after decimal point:
float f = 8.f / 9.f;
is always 0.88888
depends on hardware platform
Correct!
depends on rounding mode currently set
is always 0.88889
Question 8
1 / 1 pts
The symbol named PRIdMAX is designed to be used by:
the gets() function
the printf() function
Correct!
the scanf() function
the puts() function
Question 9
1 / 1 pts
The type named int_fast8_t is designed to choose the fastest:
floating point routines
way of compiling integer expressions
Correct!
of possible integer arithmetic implementations
method of transmitting integer values through stdin/stdout streams
Question 10
1 / 1 pts
The GMP library uses the mpz_t type to represent:
Correct!
multiprecision integer values
multiprecision float values
multiprecision rational values
multiprecision double values
Question 11
1 / 1 pts
Assuming that the x variable is of type float, the following condition:
x == x + 1.
Correct!
is unpredictable
is invalid
is always false
is always true
Question 12
1 / 1 pts
The difference between doubles and floats lies in fact, that:
Correct!
doubles have wider range and offer better precision
doubles are faster
doubles have wider range
doubles offer better precision
Question 13
1 / 1 pts
The longest part of a float value is:
all parts have equal sizes
Correct!
significand
sign
exponent
Question 14
1 / 1 pts
The absolute values of numbers representable in 32 bit IEEE754 number come from the range:
Correct!
1.175494e-38 .. 3.402823e+38
1.175494e-38 .. +inf
0.0 .. +inf
0.0 .. 3.402823e+38
Question 15
1 / 1 pts
The normalized float value:
Correct!
has the highest significand's bit set to 1
has the highest exponent's bit set to 1
has the highest exponent's bit set to 0
has the highest significand's bit set to 0
Question 16
1 / 1 pts
Dividing zeroed float value by zeroed float value produces:
abnormal program termination
a -inf result
a +inf result
Correct!
a NaN result
Question 17
1 / 1 pts
The FE_TOWARDZERO rounding mode can make:
positive numbers lesser and negative numbers bigger
negative numbers bigger while positive numbers remain untouched
positive numbers lesser while negative numbers remain untouched
Correct!
positive numbers bigger and negative numbers lesser
Question 18
1 / 1 pts
The rounding mode may be changed by means of the:
feroundmode() function
Correct!
fesetround() function
roundmode() function
setround() function
Question 19
1 / 1 pts
To output a 32 bit unsigned int value as hex number some would use the following portable specifier:
Correct!
PRIx32
"%32x"
PRIuMAX
"%32bx"
Question 20
1 / 1 pts
A function named mpf_set() is used by GMP library to:
Correct!
copy a multiprecision float variable to another variable
copy a regular float variable to regular double variable
copy a multiprecision float variable to regular float variable
copy a regular float variable to multiprecision float variable
No comments:
Post a Comment