Beruflich Dokumente
Kultur Dokumente
(a) By studying the values in Table 1, what data type should (, ) be and explain
why?
Ans:
By Studying the value in table 1 it is sufficient to use int data type because
the int data type is a 32-bit signed two's complement integer, which has a
maximum value of 231-1. It can be used to represent an unsigned 32-bit integer,
which has a minimum value of 0 and a maximum value of
231 -1.
(d) Using Table 1, trace the intermediate results when computing (3,2).
F ( 2, 2 )+ F (3,1)
return 3
F( 2,2)
F ( 2-1, 2 ) +F( 2, 2-1), urn 1urce code . m value of 232is sufficient use data type
=
F (1, 2) + F(2, 1)
return
1
return
2
=1+2
=3+3
=6
[Question 2]
Ans:
Refer source code