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?
A
1200
B
1408
C
33
D
1050
C Arrays    ISRO CS 2013    
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?
A
0
B
1
C
2
D
3
Tree Traversals    ISRO CS 2013    
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
A
Script
B
Blackboard
C
Production Rules
D
Fuzzy Logic
Arithmetic Aptitude 3    ISRO CS 2013    
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 = p
result in which type of operation?
A
pop operation in stack
B
removal of a node
C
inserting a node
D
modifying an existing node
Linked List    ISRO CS 2013    
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
A
bottom up parsing
B
top down parsing
C
recursive parsing
D
predictive parsing
Parsing and Syntax directed translation    ISRO CS 2013    
Discuss it


Question 5 Explanation: 
Shift reduce are the class of parsers which built a parse tree in bottom-up 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 single-node 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 non-backtracking 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 | ε
A
S → Aa | b A → bdA' A' → A'c | A'ba | A | ε
B
S → Aa | b A → A' | bdA', A' → cA' | adA' | ε
C
S → Aa | b A → A'c | A'd A' → bdA' | cA | ε
D
S → Aa | b A → cA' | adA' | bdA' A' → A | ε
Parsing and Syntax directed translation    ISRO CS 2013    
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?
A
2
B
3
C
4
D
5
C Storage Classes and Type Qualifiers    ISRO CS 2013    
Discuss it


Question 8
Which logic gate is used to detect overflow in 2's complement arithmetic?
A
OR gate
B
AND gate
C
NAND gate
D
XOR gate
Digital Logic & Number representation    ISRO CS 2013    Logic functions and Minimization    
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 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?
A
1
B
2
C
N/2
D
2N-1
C Arrays    ISRO CS 2013    
Discuss it


Question 9 Explanation: 
An array can be termed as 2-ordered 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 1-ordered = 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?
A
24 bytes
B
1024 bytes
C
768 bytes
D
256 bytes
Misc Topics in Computer Networks    ISRO CS 2013    
Discuss it


Question 10 Explanation: 
Number of indexes the framebuffer = 28 = 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.


My Personal Notes arrow_drop_up


Writing code in comment? Please use ide.geeksforgeeks.org, generate link and share the link here.