ISRO CS 2013
Question 1 
Let A(1:8, 5:5, 10:5) be a three dimensional array. How many elements are there in the array A?
1200  
1408  
33  
1050 
Discuss it
Question 1 Explanation:
Number of elements in first dimension of array = upper limit  lower limit + 1 = 8  1 + 1 =8
Number of elements in second dimension of array = 5  (5) + 1 = 11
Number of elements in third dimension of array = 15  (10) + 1 = 16
total number of elements = 8 * 11 * 16 = 1408
So, Answer (B) is correct.
Question 2 
The number of rotations required to insert a sequence of elements 9,6,5,8,7,10 into an empty AVL tree is?
0  
1  
2  
3 
Discuss it
Question 2 Explanation:
The insertion and rotation of the various elements are shown in the following figure:
So, the total number of rotations are 3.
Question 3 
Opportunistic reasoning is addressed by which of the following knowledge representation
Script  
Blackboard  
Production Rules  
Fuzzy Logic 
Discuss it
Question 3 Explanation:
Opportunistic reasoning is a method of selecting suitable logical inference strategy from the knowledge base of the AI system.
Blackboard is an AI model of opportunistic reasoning where a common knowledge base is updated frequently by diverse knowledge sources.
So, (B) is the correct option.
Question 4 
The following steps in a linked list
p = getnode() info (p) = 10 next (p) = list list = presult in which type of operation?
pop operation in stack  
removal of a node  
inserting a node  
modifying an existing node 
Discuss it
Question 4 Explanation:
p = getnode() // getnode() allocates the space which is equal to the size of the node type structure and returns a pointer.
info (p) = 10 // value of the new node is equal to 10
next (p) = list // adding new node to the list.
Clearly, through these steps, insertion of a node is performed.
Option (C) is correct.
Question 5 
Shift reduce parsing belongs to a class of
bottom up parsing  
top down parsing  
recursive parsing  
predictive parsing 
Discuss it
Question 5 Explanation:
Shift reduce are the class of parsers which built a parse tree in bottomup manner and scans it from left to right.
In these parsers, through shift step, a single character from the token stream is pushed on the parse stack and becomes a new singlenode parse tree.
A reduce step applies a complete grammar production rule to the recent parse trees, joining them together as one tree with a new root symbol.
These parsers include LR parsers which are nonbacktracking in nature. Examples: SLR, CLR, LALR etc.
In these parsers, through shift step, a single character from the token stream is pushed on the parse stack and becomes a new singlenode parse tree.
A reduce step applies a complete grammar production rule to the recent parse trees, joining them together as one tree with a new root symbol.
These parsers include LR parsers which are nonbacktracking in nature. Examples: SLR, CLR, LALR etc.
Question 6 
Which of the following productions eliminate left recursion in the
productions given below:
S → Aa  b
A → Ac  Sd  ε
S → Aa  b
A → bdA'
A' → A'c  A'ba  A  ε  
S → Aa  b
A → A'  bdA',
A' → cA'  adA'  ε  
S → Aa  b
A → A'c  A'd
A' → bdA'  cA  ε  
S → Aa  b
A → cA'  adA'  bdA'
A' → A  ε 
Discuss it
Question 6 Explanation:
To remove left recursion from the grammar of the form : A → Aα  β We rewrite the production rules as: A → βA' A'→ αA' ε Given Grammar: S → Aa  b A → Ac  Sd  ε after finding indirect left recursion, grammar: S → Aa  b A → Ac  Aad  bd  ε here, α = c, ad, β = bd So, Grammar after removing left recursion = S → Aa  b A → A'  bdA' A'→ CA' ada' εSo, option (B) is correct.
Question 7 
Consider the following psuedocode:
x : integer := 1 y : integer := 2 procedure add x := x + y procedure second (P: procedure) x : integer := 2 P() procedure first y : integer := 3 second(add) first() write_integer (x)What does it print if the language uses dynamic scoping with deepbinding?
2  
3  
4  
5 
Discuss it
Question 8 
Which logic gate is used to detect overflow in 2's complement arithmetic?
OR gate  
AND gate  
NAND gate
 
XOR gate

Discuss it
Question 8 Explanation:
In 2's complement numbers, we can check whether there's an overflow or not by taking the XOR of carry in and carry out of the most significant bit.
If XOR value = 0, then no overflow.
If XOR value = 1, then overflow.
Question 9 
In an array of 2N elements that is both 2ordered and 3ordered, what is the maximum number of positions that an element can be from its position if the array were 1ordered?
1  
2  
N/2  
2N1 
Discuss it
Question 9 Explanation:
An array can be termed as 2ordered array, if it contains an element which is atmost two positions away from its original position in a sorted array.
So the maximum number of positions that an element can be from its position if the array were 1ordered = 1
Option (A) is correct.
Question 10 
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?
24 bytes  
1024 bytes
 
768 bytes
 
256 bytes 
Discuss it
Question 10 Explanation:
Number of indexes the framebuffer = 2^{8} = 256
Size of each entry = 8 bits for R component + 8 bits for G component + 8 bits for B component = 24 bits = 3 Bytes
Size of frame buffer = 256 * 3 = 768 Bytes
Option (C) is correct.
There are 79 questions to complete.