ISRO Scientist/Engineer Question Paper Computer Science 2013

6. Question
Consider the following pseudo code:

x: integer := 1
y: integer := 2

procedure add

x:= x+y

procedure second (P: procedure)
x: integer :=3
P()

procedure frist
y: integer := 3
second(add)

first()
write_integer (x)

What does it print if the language uses dynamic scoping with deep binding?




Answer
7. Question
Which logic gate is used to detect overflow in 2s complement arithmetic?




Answer
8. Question
In an array of 2N elements that is both 2-ordered and 3-ordered, what is the maximum number of positions that an element can be from its position if the array were 1-ordered?




Answer
9. Question
If the frame buffer has 8 bits per pixel and 8 bits are allocated for each of the R,G,B components, what would be the size of the lookup table?




Answer
10. Question
When two BCD numbers 0x14 and 0x08 are added what is the binary representation of the resultant number?




Answer