ISRO CS 2015
Question 1 
Which of the given number has its IEEE754 32 bit floating point representation as
2.5  
3.0  
3.5  
4.5 
Question 1 Explanation:
→ Sign bit S = 0 (It means positive number)
→ E=1000 0000B = 128D (in normalized form)
→ Fraction is 1.11B (with an implicit leading 1) = 1 + 1×2^{1} + 1×2^{2}
= 1.75D
→ The number is +1.75 × 2^{(128127) }
= +3.5D
→ E=1000 0000B = 128D (in normalized form)
→ Fraction is 1.11B (with an implicit leading 1) = 1 + 1×2^{1} + 1×2^{2}
= 1.75D
→ The number is +1.75 × 2^{(128127) }
= +3.5D
Question 2 
The range of integers that can be represented by an n bit 2’s complement number system is:
– 2^{n – 1} to 2^{n – 1} – 1  
– (2^{n – 1} – 1) to (2^{n – 1} – 1)  
– 2^{n – 1} to 2^{n – 1}  
– (2^{n – 1} + 1) to (2^{n – 1} – 1) 
Question 2 Explanation:
In 2’s complement numbers, the range of integers are from 2^{n1} to 2^{n1} – 1
Question 3 
How many 32K X 1 RAM chips are needed to provide a memory capacity of 256Kbytes?
8  
32  
64  
128 
Question 3 Explanation:
Number of RAM chips required = Memory capacity / RAM chip capacity.
=(256K * 8) / (32K x 1)
=(256*1024*8) / (32*1024*1)
=64
=(256K * 8) / (32K x 1)
=(256*1024*8) / (32*1024*1)
=64
Question 4 
A modulus 12 ring counter requires a minimum of
10 flipflops  
12 flipflops  
8 flipflops  
6 flipflops 
Question 4 Explanation:
A ring counter is a type of counter composed of flipflops connected into a shift register, with the output of the last flipflop fed to the input of the first, making a "circular" or "ring" structure.
The “MODULO” or “MODULUS” of a counter is the number of states the counter counts or sequences through before repeating itself and a ring counter can be made to output any modulo number. A “modn” ring counter will require “n” number of flipflops connected together to circulate a single data bit providing “n” different output states
So, modulus12 requires , 12 flipflops.
The “MODULO” or “MODULUS” of a counter is the number of states the counter counts or sequences through before repeating itself and a ring counter can be made to output any modulo number. A “modn” ring counter will require “n” number of flipflops connected together to circulate a single data bit providing “n” different output states
So, modulus12 requires , 12 flipflops.
Question 5 
The complement of the Boolean expression AB ( B’C + AC ) is
( A’ + B’ ) + ( B + C’ )( A’ + C’ )  
( A’ + B’ ) + ( BC’ + A’C’ )  
( A’ + B’ )( B + C’) + ( A + C’ )  
( A + B )( B’ + C )( A + C ) 
Question 5 Explanation:
→ Finding complement boolean expression, we require Demorgan’s law.
→ DeMorgan’s law and after complementing:
⇒ ( AB ( B’C + AC ))’
⇒ (A + B)’ + (B’C + AC)’
⇒ (A’ + B’) + ( B’C)’ (AC)’
⇒ (A’ + B’) + ( B + C’)(A’ + C’)
→ DeMorgan’s law and after complementing:
⇒ ( AB ( B’C + AC ))’
⇒ (A + B)’ + (B’C + AC)’
⇒ (A’ + B’) + ( B’C)’ (AC)’
⇒ (A’ + B’) + ( B + C’)(A’ + C’)
Question 6 
The code which uses 7 bits to represent a character is
ASCII  
BCD  
EBCDIC  
Gray 
Question 6 Explanation:
→ ISO/IEC 646, like ASCII, is a 7bit character set. It does not make any additional codes available, so the same code points encoded different characters in different countries. Escape codes were defined to indicate which national variant applied to a piece of text, but they were rarely used, so it was often impossible to know what variant to work with and, therefore, which character a code represented, and in general, textprocessing systems could cope with only one variant anyway.
→ Extended Binary Coded Decimal Interchange Code (EBCDIC) is an 8bit binary code for numeric and alphanumeric characters.
→ BCD encoding uses 4 bits to represent each digit from the range 0 to 9 in its binary form.
→ In case of Gray codes, any number of bits can be used to represent a character, according to the requirement.
→ Extended Binary Coded Decimal Interchange Code (EBCDIC) is an 8bit binary code for numeric and alphanumeric characters.
→ BCD encoding uses 4 bits to represent each digit from the range 0 to 9 in its binary form.
→ In case of Gray codes, any number of bits can be used to represent a character, according to the requirement.
Question 7 
If half adders and full adders are implemented using gates, then for the addition of two 17 bit numbers (using minimum gates) the number of half adders and full adders required will be
0, 17  
16, 1  
1, 16  
8, 8 
Question 7 Explanation:
1. An adder is a digital circuit that performs addition of numbers. The half adder adds two binary digits called as augend and addend and produces two outputs as sum and carry; XOR is applied to both inputs to produce sum and AND gate is applied to both inputs to produce carry.
2. The full adder adds 3 one bit numbers, where two can be referred to as operands and one can be referred to as bit carried in. And produces 2bit output, and these can be referred to as output carry and sum.
Half adder is used to add two numbers of the least significant bits, so one half adder is required. In order to add remaining 16 bits of two numbers , we require 16 full adders
2. The full adder adds 3 one bit numbers, where two can be referred to as operands and one can be referred to as bit carried in. And produces 2bit output, and these can be referred to as output carry and sum.
Half adder is used to add two numbers of the least significant bits, so one half adder is required. In order to add remaining 16 bits of two numbers , we require 16 full adders
Question 8 
Minimum number of 2x1 multiplexers required to realize the following function,
f = A’B’C + A’B’C’
Assume that inputs are available only in true form and Boolean constant 1 and 0 are available.
f = A’B’C + A’B’C’
Assume that inputs are available only in true form and Boolean constant 1 and 0 are available.
1  
2  
3  
7 
Question 8 Explanation:
Given function f = A’B’C + A’B’C’
=A’B’(C+C’) (C+C’=1)
=A’B’
=(A+B)’
So we can implement with minimum Two number of 2x1 multiplexers
=A’B’(C+C’) (C+C’=1)
=A’B’
=(A+B)’
So we can implement with minimum Two number of 2x1 multiplexers
Question 9 
The number of 1’s in the binary representation of (3*4096 + 15*256 + 5*16 + 3) are:
8  
9  
10  
12 
Question 9 Explanation:
Binary expression of (3*4096 + 15*256 + 5*16 + 3)
=(12,288+3840+80+3)
=(16211)_{10}
=(0011111101010011)_{2}
Total number of 1’s in binary representation is 10.
=(12,288+3840+80+3)
=(16211)_{10}
=(0011111101010011)_{2}
Total number of 1’s in binary representation is 10.
Question 10 
The boolean expression AB + AB’+ A’C + AC is independent of the boolean variable
A  
B  
C  
None of these 
Question 10 Explanation:
→ AB + AB' + A'C + AC
= A(B + B') + C(A + A')
= A+C
As the expression is independent of 'B'
Question 11 
If the sequence of operations – push (1), push (2), pop, push (1), push (2), pop, pop, pop, push (2), pop are performed on a stack, the sequence of popped out values
2,2,1,1,2  
2,2,1,2,2  
2,1,2,2,1  
2,1,2,2,2

Question 11 Explanation:
Final Pop sequence: 22112
Question 12 
A machine needs a minimum of 100 sec to sort 1000 names by quick sort. The minimum time needed to sort 100 names will be approximately
50.2 sec  
6.7 sec  
72.7 sec  
11.2 sec 
Question 12 Explanation:
We need to find the minimum time to sort the names by using quick sort.
The Worst case time complexity is O(n^{2})
Average and best case time complexity is O(n logn)
Step1: Time taken to sort 1000 names by quicksort
100= c*nlogn
= c*1000log1000
= 100
c=1/10log1000
Now, time taken to sort 100 names by quicksort,
=c*nlogn
= (1/10log1000)*100*log100
= 6.7
The Worst case time complexity is O(n^{2})
Average and best case time complexity is O(n logn)
Step1: Time taken to sort 1000 names by quicksort
100= c*nlogn
= c*1000log1000
= 100
c=1/10log1000
Now, time taken to sort 100 names by quicksort,
=c*nlogn
= (1/10log1000)*100*log100
= 6.7
Question 13 
Six files F1, F2, F3, F4, F5 and F6 have 100, 200, 50, 80, 120, 150 records respectively. In what order should they be stored so as to optimize act. Assume each file is accessed with the same frequency
F3, F4, F1, F5, F6, F2  
F2, F6, F5, F1, F4, F3  
F1, F2, F3, F4, F5, F6  
Ordering is immaterial as all files are accessed with the same frequency. 
Question 13 Explanation:
Optimal merge pattern will give the optimal result after performing sorted order. Every time it will take least frequency elements and performing merging.
→ Final order is F3, F4, F1, F5, F6, F2
→ Final order is F3, F4, F1, F5, F6, F2
Question 14 
A hash table with ten buckets with one slot per bucket is shown in the following figure. The symbols S1 to S7 initially entered using a hashing function with linear probing.The maximum number of comparisons needed in searching an item that is not present is
4  
5  
6  
3 
Question 14 Explanation:
In this, maximum size of cluster = 4 (S6, S3, S7, S1)
→ Worst case of finding a number is equal to maximum size of cluster + 1(after searching all the cluster it enters into empty cluster)
→ Maximum no. of comparisons = 4+1
= 5
→ Worst case of finding a number is equal to maximum size of cluster + 1(after searching all the cluster it enters into empty cluster)
→ Maximum no. of comparisons = 4+1
= 5
Question 15 
The queue data structure is to be realized by using stack. The number of stacks needed would be
It cannot be implemented  
2 stacks  
4 stacks  
1 stack 
Question 15 Explanation:
Step1: Pop elements from Stack1 and push into Stack2.
For this,
int x=element=stack1,pop();
stack2.push(element);
Step2: Once the complete stack1 gets copied to Stack2, then we can simply call pop() on s2, it will remove the element1.
So, A queue can be implemented using 2 stacks.
For this,
int x=element=stack1,pop();
stack2.push(element);
Step2: Once the complete stack1 gets copied to Stack2, then we can simply call pop() on s2, it will remove the element1.
So, A queue can be implemented using 2 stacks.
Question 16 
Consider the following Relationship Entity Diagram(ERD)
Which of the following possible relations will not hold if the above ERD is mapped into a relation model?
Which of the following possible relations will not hold if the above ERD is mapped into a relation model?
Person (NID, Name)  
Qualification (NID, ExamID, QualifiedDate)  
Exam (ExamID, NID, ExamName)  
Exam (ExamID, ExamName) 
Question 16 Explanation:
Given diagram is ER diagram , So any object, for example, entities, attributes of an entity, relationship sets, and attributes of relationship sets, can be represented with the help of an ER diagram.
We need to convert ER diagram to relational model.
There are two entities in the ER diagram named Person and Exam with attributes which are represented in ellipse.
Table name: Person
Now Create table for a relationship
Add the primary keys of all participating Entities as fields of table with their respective data types.
If relationship has any attribute, add each attribute as field of table.
Declare a primary key composing all the primary keys of participating entities.
Declare all foreign key constraints.
Table for “Qualification” relationship
We need to convert ER diagram to relational model.
There are two entities in the ER diagram named Person and Exam with attributes which are represented in ellipse.
Table name: Person
Now Create table for a relationship
Add the primary keys of all participating Entities as fields of table with their respective data types.
If relationship has any attribute, add each attribute as field of table.
Declare a primary key composing all the primary keys of participating entities.
Declare all foreign key constraints.
Table for “Qualification” relationship
Question 17 
Consider the following log sequence of two transactions on a bank account, with initial balance 12000, that transfer 2000 to a mortgage payment and then apply a 5% interest.
 T1 start
 T1 B old=1200 new=10000
 T1 M old=0 new=2000
 T1 commit
 T2 start
 T2 B old=10000 new=10500
 T2 commit
We must redo log record 6 to set B to 10500  
We must undo log record 6 to set B to 10000 and then redo log records 2 and 3  
We need not redo log records 2 and 3 because transaction T1 has committed  
We can apply redo and undo operations in arbitrary order because they are idempotent. 
Question 17 Explanation:
→ When the database system crashes after the transactions have committed then we need to redo the log records.
→ And if the database system crashes before the transactions have committed then we need to undo the log records.
So from above theory we can say that option (B) is the correct Solution.
→ And if the database system crashes before the transactions have committed then we need to undo the log records.
So from above theory we can say that option (B) is the correct Solution.
Question 18 
Given a block can hold either 3 records or 10 key pointers. A database contains n records, then how many blocks do we need to hold the data file and the dense index
13n/30  
n/3  
n/10  
n/30 
Question 18 Explanation:
Total number of records in the data base=n
Given block will hold either 3 records or 10 key pointers.
Number of blocks to store “n” records = n/3
Number of blocks to store dense file index = n/10
Total blocks to hold data file and dense index = n/3 + n/10 = 13n/30 blocks.
Given block will hold either 3 records or 10 key pointers.
Number of blocks to store “n” records = n/3
Number of blocks to store dense file index = n/10
Total blocks to hold data file and dense index = n/3 + n/10 = 13n/30 blocks.
Question 19 
The correct syntax to write “Hi there” in Javascript is
jscript.write (“Hi There”);  
document.write (“Hi There”);  
print (“Hi There”);  
print.jscript (“Hi There”); 
Question 19 Explanation:
JavaScript can "display" data in different ways:
Writing into an HTML element, using innerHTML.
Writing into the HTML output using document.write().
Writing into an alert box, using window.alert().
Writing into the browser console, using console.log().
Writing into an HTML element, using innerHTML.
Writing into the HTML output using document.write().
Writing into an alert box, using window.alert().
Writing into the browser console, using console.log().
Question 20 
Let R = (A, B, C, D, E, F) be a relation schema with the following dependencies
C→ F, E→ A, EC→ D, A→ B. Which of the following is a key of R?
CD  
EC  
AE  
AC 
Question 20 Explanation:
Here, simple way to solve this question is,
First we have to find the right hand side values of a dependencies. Check whether it cover all variables in a relation .
In right hand side, CE are missing. It means definitely CE should be there in candidate key.
(CE)+=(A,B,C,D,E,F).
Remaining all are not satisfying candidate key properties.
First we have to find the right hand side values of a dependencies. Check whether it cover all variables in a relation .
In right hand side, CE are missing. It means definitely CE should be there in candidate key.
(CE)+=(A,B,C,D,E,F).
Remaining all are not satisfying candidate key properties.
Question 21 
Consider the following code fragment
void foo(int x, int y)
{
x+=y;
y+=x;
}
main()
{
int x=5.5;
foo(x,x);
}
What is the final value of x in both call by value and call by reference, respectively?
void foo(int x, int y)
{
x+=y;
y+=x;
}
main()
{
int x=5.5;
foo(x,x);
}
What is the final value of x in both call by value and call by reference, respectively?
5 and 16  
5 and 12  
5 and 20  
12 and 20 
Question 21 Explanation:
Call by Value:
The call by value method of passing arguments to a function copies the actual value of an argument into the formal parameter of the function. In this case, changes made to the parameter inside the function have no effect on the argument.
foo(x,x) >foo(5,5)
Modification of x and y values won’t effect in the main program, So still x will hold value “5” because the data type is integer.
Call by Reference:
The call by reference method of passing arguments to a function copies the address of an argument into the formal parameter. Inside the function, the address is used to access the actual argument used in the call. It means the changes made to the parameter affect the passed argument.
Function call foo(x,x)foo(5,5) calls the function
void foo(int x, int y)
{
x+=y;
y+=x;
}
Here x and y variables, both pointing to same variable “x” in the main function.
So, if any modification done in the function it automatically reflect in the main function.
x+=y means x=x+y=5+5=10 // The variable “x” of main function will hold value 10 which used by both local variables of x and y
y+=x means u=y+x= 10+10=20 // Y value is 10 because , it point to variable ”x” in the main function.
The call by value method of passing arguments to a function copies the actual value of an argument into the formal parameter of the function. In this case, changes made to the parameter inside the function have no effect on the argument.
foo(x,x) >foo(5,5)
Modification of x and y values won’t effect in the main program, So still x will hold value “5” because the data type is integer.
Call by Reference:
The call by reference method of passing arguments to a function copies the address of an argument into the formal parameter. Inside the function, the address is used to access the actual argument used in the call. It means the changes made to the parameter affect the passed argument.
Function call foo(x,x)foo(5,5) calls the function
void foo(int x, int y)
{
x+=y;
y+=x;
}
Here x and y variables, both pointing to same variable “x” in the main function.
So, if any modification done in the function it automatically reflect in the main function.
x+=y means x=x+y=5+5=10 // The variable “x” of main function will hold value 10 which used by both local variables of x and y
y+=x means u=y+x= 10+10=20 // Y value is 10 because , it point to variable ”x” in the main function.
Question 22 
Consider the following relational schema:
Suppliers( sid:integer, sname:string, city:string, street:string )
Parts( pid:integer, pname:string, color:string)
Catalog( sid:integer, pid:integer, cost:real)
Consider the following relational query on the above database:
SELECT S.sname
FROM Suppliers S
WHERE S.sid NOT IN (SELECT C.sid FROM Catalog C
WHERE C.pid NOT IN (SELECT P.pid FROM Parts P
WHERE P.color<> 'blue'))
Assume that relations corresponding to the above schema are not empty. Which one of the following is the correct interpretation of the above query?
Suppliers( sid:integer, sname:string, city:string, street:string )
Parts( pid:integer, pname:string, color:string)
Catalog( sid:integer, pid:integer, cost:real)
Consider the following relational query on the above database:
SELECT S.sname
FROM Suppliers S
WHERE S.sid NOT IN (SELECT C.sid FROM Catalog C
WHERE C.pid NOT IN (SELECT P.pid FROM Parts P
WHERE P.color<> 'blue'))
Assume that relations corresponding to the above schema are not empty. Which one of the following is the correct interpretation of the above query?
Find the names of all suppliers who have supplied a nonblue part.  
Find the names of all suppliers who have not supplied a nonblue part  
Find the names of all suppliers who have supplied only non blue parts.  
Find the names of all suppliers who have not supplied only nonblue parts. 
Question 22 Explanation:
If we execute the given query the output will be S3 and S4 i.e., names of all suppliers who didn’t supply blue parts which is option (A).
Option (D) says names of suppliers who didn’t supply only blue parts that means, supplier should supply all other parts for sure and shouldn’t supply blue part.
Question 23 
Consider the following schema:
Emp (Empcode, Name, Sex, Salary, Deptt)
A simple SQL query is executed as follows:
SELECT Deptt FROM Emp WHERE sex = 'M' GROUP by Dept Having avg (Salary) > {select avg (Salary) from Emp}
The output will be
Emp (Empcode, Name, Sex, Salary, Deptt)
A simple SQL query is executed as follows:
SELECT Deptt FROM Emp WHERE sex = 'M' GROUP by Dept Having avg (Salary) > {select avg (Salary) from Emp}
The output will be
Average salary of male employee is the average salary of the organization  
Average salary of male employee is less than the average salary of the organization  
Average salary of male employee is equal to the average salary of the organization  
Average salary of male employee is more than the average salary of the organization 
Question 23 Explanation:
Query1: select avg (Salary) from Emp:
This query will give average salary of all the all employes.
Query2:SELECT Deptt FROM Emp WHERE sex = 'M' GROUP by Dept Having avg (Salary)
Average salary of employee who is male where we grouping by department
Query2 > Query1
Average salary of male employee is more than the average salary of the organization
This query will give average salary of all the all employes.
Query2:SELECT Deptt FROM Emp WHERE sex = 'M' GROUP by Dept Having avg (Salary)
Average salary of employee who is male where we grouping by department
Query2 > Query1
Average salary of male employee is more than the average salary of the organization
Question 24 
Given the following expression grammar:
E→ E*F  F+E F
F→ FF  id
Which of the following is true?
E→ E*F  F+E F
F→ FF  id
Which of the following is true?
* has higher precedence than +  
– has higher precedence than *  
+ and – have same precedence  
+ has higher precedence than * 
Question 24 Explanation:
The operator which is in low level that can have high preference.
Order of precedence is *, +, .
Here * and + have equal preference, '' can have higher precedence than + and *.
Order of precedence is *, +, .
Here * and + have equal preference, '' can have higher precedence than + and *.
Question 25 
The number of tokens in the following C statement is
printf(“i=%d, &i=%x”, i&i);
printf(“i=%d, &i=%x”, i&i);
13  
6  
10  
0 
Question 25 Explanation:
Question 26 
Which grammar rules violate the requirement of the operator grammar?
A, B, C are variables and a, b, c are terminals
1) A → BC
2) A → CcBb
3) A → BaC
4) A → ε
1 only  
1 and 2 only  
1 and 3 only  
1 and 4 only 
Question 26 Explanation:
Operator values doesn't contains nullable values and two adjacent nonterminals on RHS production.
i) On RHS it contains two adjacent nonterminals.
ii) Have nullable values.
i) On RHS it contains two adjacent nonterminals.
ii) Have nullable values.
Question 27 
Which one of the following is a topdown parser?
Recursive descent parser  
Shift left associative parser  
SLR(k) parser  
LR(k) parser 
Question 27 Explanation:
Question 28 
YACC stands for
yet accept compiler constructs  
yet accept compiler compiler  
yet another compiler construct  
yet another compiler compiler 
Question 28 Explanation:
→ Yacc (Yet Another CompilerCompiler) is a computer program for the Unix operating system developed by Stephen C. Johnson.
→ It is a Look Ahead LefttoRight (LALR) parser generator, generating a parser, the part of a compiler that tries to make syntactic sense of the source code, specifically a LALR parser, based on an analytic grammar written in a notation similar to BackusNaur Form (BNF)
→ It is a Look Ahead LefttoRight (LALR) parser generator, generating a parser, the part of a compiler that tries to make syntactic sense of the source code, specifically a LALR parser, based on an analytic grammar written in a notation similar to BackusNaur Form (BNF)
Question 29 
Which statement is true?
LALR parser is more powerful and costly as compare to other parsers  
All CFG’s are LP and not all grammars are uniquely defined  
Every SLR grammar is unambiguous but not every unambiguous grammar is SLR  
LR(K) is the most general backtracking shift reduce parsing method 
Question 29 Explanation:
OptionA: LR > LALR > SLR
Canonical LR parser is more powerful than LALR parser. So, it FALSE
OptionB: Here, LP is linear precedence. Every grammar generated by LP are CFG but all CFG's are not LP. So, it is false
OptionC: TRUE
OptionD: LR(K) is general non backtracking shift reduce parsing method. So, It is false
Question 30 
Semaphores are used to solve the problem of
I. Race Condition
II. Process Synchronization
III. Mutual Exclusion
IV. None of the above
I and II  
II and III  
All of the above  
None of the above 
Question 30 Explanation:
Semaphore are used to solve the problem of process synchronization and mutual exclusion.
Semaphore are 2 types.
Counting semaphore
Binary semaphore
Semaphore are 2 types.
Counting semaphore
Binary semaphore
Question 31 
If there are 32 segments, each size 1K bytes, then the logical address should have
13 bits  
14 bits  
15 bits  
16 bits 
Question 31 Explanation:
Given data, total 32 segments
Each segment size is 1K bytes.
Find the logical address=?
32 segments=2^{5}
Segment size=2^{10}
⇒ 2^{5}*2^{10}
⇒ 215
So, 15 bits are required.
Each segment size is 1K bytes.
Find the logical address=?
32 segments=2^{5}
Segment size=2^{10}
⇒ 2^{5}*2^{10}
⇒ 215
So, 15 bits are required.
Question 32 
In a lottery scheduler with 40 tickets, how we will distribute the tickets among 4 processes and such that each process gets 10%, 5%, 60% and 25% respectively?
a  
b  
c  
d 
Question 32 Explanation:
Total number of tickets =40
Total 4 processors:
Total 4 processors:
Question 33 
Suppose a system contains n processes and system uses the roundrobin algorithm for CPU scheduling then which data structure is best suited for ready queue of the process
stack  
queue  
circular queue  
tree 
Question 33 Explanation:
→ This type of scheduling is one of the very basic algorithms for Operating Systems in computers which can be implemented through circular queue data structure.
→ Roundrobin (RR) is one of the algorithms employed by process and network schedulers in computing.
→ As the term is generally used, time slices (also known as time quanta) are assigned to each process in equal portions and in circular order, handling all processes without priority (also known as cyclic executive).
→ Roundrobin scheduling is simple, easy to implement, and starvationfree.
→ Roundrobin scheduling can also be applied to other scheduling problems, such as data packet scheduling in computer networks.
→ Roundrobin (RR) is one of the algorithms employed by process and network schedulers in computing.
→ As the term is generally used, time slices (also known as time quanta) are assigned to each process in equal portions and in circular order, handling all processes without priority (also known as cyclic executive).
→ Roundrobin scheduling is simple, easy to implement, and starvationfree.
→ Roundrobin scheduling can also be applied to other scheduling problems, such as data packet scheduling in computer networks.
Question 34 
A hard disk system has the following parameters :
Number of tracks = 500
Number of sectors/track = 100
Number of bytes /sector = 500
Time taken by the head to move from one track to adjacent track = 1 ms
Rotation speed = 600 rpm.
What is the average time taken for transferring 250 bytes from the disk ?
300.5 ms  
255.5 ms  
255 ms  
300 ms 
Question 34 Explanation:
Avg. time to transfer = Avg. seek time + Avg. rotational delay + Data transfer time
For Avg. seek time:
Given that, time to move between successive tracks is 1ms.
Time to move from track1 to track1 = 0ms
Time to move from track1 to track2 = 1ms
Time to move from track1 to track3 = 2ms
⋮ Time to move from track1 to track500 = 499ms
∴ Avg. seek time = 0+1+2+...+499/500 = 249.5ms
Avg. rotational delay:
600 rotations in 60sec.
One rotation takes 60/600 s = 100ms ∴ Avg. rotational delay = 100/2 = 50ms
Data transfer time:
In one rotation, we can read data on one complete track
= 100 × 500 = 50,000B data is read in one complete rotation
One complete rotation takes 100ms.
100ms → 50,000B
250B → 100/50000 × 250 = 0.5ms
∴ Avg. time to transfer = 249.5 × 50 + 0.5 = 300ms
For Avg. seek time:
Given that, time to move between successive tracks is 1ms.
Time to move from track1 to track1 = 0ms
Time to move from track1 to track2 = 1ms
Time to move from track1 to track3 = 2ms
⋮ Time to move from track1 to track500 = 499ms
∴ Avg. seek time = 0+1+2+...+499/500 = 249.5ms
Avg. rotational delay:
600 rotations in 60sec.
One rotation takes 60/600 s = 100ms ∴ Avg. rotational delay = 100/2 = 50ms
Data transfer time:
In one rotation, we can read data on one complete track
= 100 × 500 = 50,000B data is read in one complete rotation
One complete rotation takes 100ms.
100ms → 50,000B
250B → 100/50000 × 250 = 0.5ms
∴ Avg. time to transfer = 249.5 × 50 + 0.5 = 300ms
Question 35 
At a particular time of computation the value of a counting semaphore is 7. Then 20 P operations and 15 V operations were completed on this semaphore. The resulting value of the semaphore is :
42  
2  
7  
12 
Question 35 Explanation:
Counting semaphore value is 7
After 20 P operations value of semaphore = 7 – 20 = 13
After 15 V operations value of semaphore = 13 + 15 = 2
After 20 P operations value of semaphore = 7 – 20 = 13
After 15 V operations value of semaphore = 13 + 15 = 2
Question 36 
Increasing the RAM of a computer typically improves performance because:
Virtual Memory increases  
Larger RAMs are faster  
Fewer page faults occur  
Fewer segmentation faults occur 
Question 36 Explanation:
→ When page frames increases, then no. of page faults decreases.
→ Such as if RAM size increases, then no. of page entries increases, then no. of page faults decreases.
→ Such as if RAM size increases, then no. of page entries increases, then no. of page faults decreases.
Question 37 
Consider the following program.
main()
{
fork();
fork();
fork();
}
How many new processes will be created?
main()
{
fork();
fork();
fork();
}
How many new processes will be created?
8  
6  
7  
5 
Question 37 Explanation:
The no. of child process created = 2^{n} 1
= 2^{3} 1
= 7
(where n is number of fork() statements)
= 2^{3} 1
= 7
(where n is number of fork() statements)
Question 38 
Consider the following C declaration
struct
{
short s[5];
union
{
float y;
long z;
}u;
}t;
Assume that the objects of the type short, float and long occupy 2 bytes, 4 bytes and 8 bytes, respectively. The memory requirement for variable t, ignoring alignment consideration, is
struct
{
short s[5];
union
{
float y;
long z;
}u;
}t;
Assume that the objects of the type short, float and long occupy 2 bytes, 4 bytes and 8 bytes, respectively. The memory requirement for variable t, ignoring alignment consideration, is
22 bytes  
18 bytes  
14 bytes  
10 bytes 
Question 38 Explanation:
short [5] = 5×2 = 10
max[float, long] = max [4, 8] = 8
Total = short[5] + max[float,long] = 10+8 = 18
Question 39 
If a node has K children in Btree, then the node contains exactly _____ keys.
K^{2}  
K – 1  
K + 1  
K^{1/2} 
Question 39 Explanation:
According to Knuth's definition, a Btree of order m is a tree which satisfies the following properties:
Every node has at most m children.
Every nonleaf node (except root) has at least ceil(m/2) children.
The root has at least two children if it is not a leaf node.
A nonleaf node with k children contains k−1 keys.
All leaves appear in the same level, and carry information.
Question 40 
The time complexity of the following C function is (assume n > 0)
int recursive (int n)
{
if(n == 1)
return (1);
else
return (recursive (n1) + recursive (n1));
}
int recursive (int n)
{
if(n == 1)
return (1);
else
return (recursive (n1) + recursive (n1));
}
O(n)  
O(n log n)  
O(n^{2})  
O(2^{n}) 
Question 40 Explanation:
T(n) = 2T (n  1) + 1
= 2 [2T(n  2) + 1] + 1
= 2^{2} T(n  2) + 3
⋮
= 2^{k}T(n  k) + (2^{k}  1)
= 2^{n1}T(1) + (2^{n1}  1)
= 2^{n1} + 2^{n1}  1
= 2^{n}  1
≅ O( 2^{n} )
= 2 [2T(n  2) + 1] + 1
= 2^{2} T(n  2) + 3
⋮
= 2^{k}T(n  k) + (2^{k}  1)
= 2^{n1}T(1) + (2^{n1}  1)
= 2^{n1} + 2^{n1}  1
= 2^{n}  1
≅ O( 2^{n} )
Question 41 
The number of spanning tree for a complete graph with 7 vertices are:
2^{5}  
7^{5}  
3^{5}  
2^{2×5} 
Question 41 Explanation:
To find number of spanning trees of a complete graph is n^{n2}.
Here, there are 7 nodes.
=7^{72}
=7^{5}
=16,807
Here, there are 7 nodes.
=7^{72}
=7^{5}
=16,807
Question 42 
If one uses straight twoway merge sort algorithm to sort the following elements in ascending order:
20, 47, 15, 8, 9, 4, 40, 30, 12, 17
then the order of these elements after second pass of the algorithm is:
20, 47, 15, 8, 9, 4, 40, 30, 12, 17
then the order of these elements after second pass of the algorithm is:
8, 9, 15, 20, 47, 4, 12, 17, 30, 40  
8, 15, 20, 47, 4, 9, 30, 40, 12, 17  
15, 20, 47, 4, 8, 9, 12, 30, 40, 17  
4, 8, 9, 15, 20, 47, 12, 17, 30, 40 
Question 42 Explanation:
Explanation:
Question 43 
Let R1 and R2 be regular sets defined over the alphabet, then
R1 ∩ R2 is not regular  
R1 ∪ R2 is not regular  
Σ * – R1 is regular  
R1 * is not regular 
Question 43 Explanation:
Regular languages are closed under,
1) Intersection
2) Union
3) Complement
4) Kleeneclosure
Σ*  R_{1} is the complement of R_{1}.
1) Intersection
2) Union
3) Complement
4) Kleeneclosure
Σ*  R_{1} is the complement of R_{1}.
Question 44 
The DNS maps the IP address to
A binary address as strings  
An alphanumeric address  
A hierarchy of domain names  
A hexadecimal address 
Question 44 Explanation:
→ DNS maps the IP addresses into a hierarchy of domain names.
→ DNS is a host name to IP address translation service.
→ DNS is a distributed database implemented in a hierarchy of name servers.
→ It is an application layer protocol for message exchange between clients and servers.
→ DNS is a host name to IP address translation service.
→ DNS is a distributed database implemented in a hierarchy of name servers.
→ It is an application layer protocol for message exchange between clients and servers.
Question 45 
To add a background color for all h1 elements, which of the following HTML syntax is used
h1 { backgroundcolor :#FFFFFF}  
{ backgroundcolor :#FFFFFF} . h1  
h1 { backgroundcolor :#FFFFFF} . h1(all)  
h1. all{bgcolor= #FFFFFF} 
Question 45 Explanation:
→ Select and style all
elements AND all
elements:
Example:
h1, p { backgroundcolor: yellow; }
→ To style several elements with the same style, separate each element name with a comma.
Question 46 
To declare the version of XML, the correct syntax is
< ?xml version='1.0'/ >  
< *xml version='1.0'/ >  
< ?xml version="1.0"/ >  
< /xml version='1.0'/ > 
Question 46 Explanation:
1.XML stands for eXtensible Markup Language.
2.XML was designed to store and transport data.
3.XML was designed to be both human and machinereadable.
Syntax: < ?xml version="1.0"/ >
2.XML was designed to store and transport data.
3.XML was designed to be both human and machinereadable.
Syntax: < ?xml version="1.0"/ >
Question 47 
A Tswitch is used to
Control how messages are passed between computers  
Echo every character that is received  
Transmit characters one at a time  
Rearrange the connections between computing equipments 
Question 47 Explanation:
A Tswitch is used to rearrange the connections between computing equipments
Question 48 
What frequency range is used for microwave communications, satellite and radar?
Low frequency: 30 kHz to 300 kHz  
Medium frequency: 300 kHz to 3 MHz  
Medium frequency: 300 kHz to 3 MHz  
Extremely high frequency: 30000 kHz 
Question 48 Explanation:
→ Microwave signals are often divided into three categories:
1)Ultra high frequency (UHF) (0.33 GHz);
2)Super high frequency (SHF) (330 GHz); and
3)Extremely high frequency (EHF) (30300 GHz).
→ In addition, microwave frequency bands are designated by specific letters.
→ The term “P band” is sometimes used for ultra high frequencies below the Lband. For other definitions, see Letter Designations of Microwave Bands
→ Lower Microwave frequencies are used for longer links, and regions with higher rain fade. Conversely, Higher frequencies are used for shorter links and regions with lower rain fade.
1)Ultra high frequency (UHF) (0.33 GHz);
2)Super high frequency (SHF) (330 GHz); and
3)Extremely high frequency (EHF) (30300 GHz).
→ In addition, microwave frequency bands are designated by specific letters.
→ The term “P band” is sometimes used for ultra high frequencies below the Lband. For other definitions, see Letter Designations of Microwave Bands
→ Lower Microwave frequencies are used for longer links, and regions with higher rain fade. Conversely, Higher frequencies are used for shorter links and regions with lower rain fade.
Question 49 
How many bits internet address is assigned to each host on a TCP/IP internet which is used in all communication with the host?
16 bits  
32 bits  
48 bits  
64 bits 
Question 49 Explanation:
→ Present we are using IPv4 address, it has 32 bits to communicate with the host.
→ Planning to shift IPv6 address, it has 128 bits to communicate with the host
→ Planning to shift IPv6 address, it has 128 bits to communicate with the host
Question 50 
How many characters per sec (7 bits + 1 parity) can be transmitted over a 2400 bps line if the transfer is synchronous ( 1 start and 1 stop bit)?
300  
240  
250  
275 
Question 50 Explanation:
Given bandwidth is 2400 bps
Each character consists of (7+1)bits = 8 bits
Synchronous transmission is a data transfer method which is characterized by a continuous stream of data in the form of signals which are accompanied by regular timing signals which are generated by some external clocking mechanism meant to ensure that both the sender and receiver are synchronized with each other.
Once sender and receiver synchronized means no need to use start and stop bits every time
Total number of characters can be transmitted per second is =bandwidth/ number of bits in each character=2400/8 = 300
Each character consists of (7+1)bits = 8 bits
Synchronous transmission is a data transfer method which is characterized by a continuous stream of data in the form of signals which are accompanied by regular timing signals which are generated by some external clocking mechanism meant to ensure that both the sender and receiver are synchronized with each other.
Once sender and receiver synchronized means no need to use start and stop bits every time
Total number of characters can be transmitted per second is =bandwidth/ number of bits in each character=2400/8 = 300
Question 51 
In CRC if the data unit is 100111001 and the divisor is 1011 then what is dividend at the receiver?
100111001101  
100111001011  
100111001  
100111001110 
Question 51 Explanation:
→ A cyclic redundancy check (CRC) is an errordetecting code commonly used in digital networks and storage devices to detect accidental changes to raw data. Blocks of data entering these systems get a short check value attached, based on the remainder of a polynomial division of their contents. On retrieval, the calculation is repeated and, in the event the check values do not match, corrective action can be taken against data corruption. CRCs can be used for error correction
→ Given data unit is 100111001 and divisor is 1011
→ The polynomial is written in binary as the coefficients; a 3rddegree polynomial has 4 coefficients (1x^{3} + 0x^{2} + 1x + 1). In this case, the coefficients are 1, 0, 1 and 1. The result of the calculation is 3 bits long.
→ First padded with zeros corresponding to the bit length n of the CRC. Here we used 3bit CRC
→ After padding zeros to the data unit, Data unit = 100111001000
→ Divide data unit by divisor
→ Append the remainder(011) to the data unit where zero’s are padded Then data unit becomes 100111001011 at receiver end
→ Given data unit is 100111001 and divisor is 1011
→ The polynomial is written in binary as the coefficients; a 3rddegree polynomial has 4 coefficients (1x^{3} + 0x^{2} + 1x + 1). In this case, the coefficients are 1, 0, 1 and 1. The result of the calculation is 3 bits long.
→ First padded with zeros corresponding to the bit length n of the CRC. Here we used 3bit CRC
→ After padding zeros to the data unit, Data unit = 100111001000
→ Divide data unit by divisor
→ Append the remainder(011) to the data unit where zero’s are padded Then data unit becomes 100111001011 at receiver end
Question 52 
An ACK number of 1000 in TCP always means that
999 bytes have been successfully received  
1000 bytes have been successfully received  
1001 bytes have been successfully received  
None of the above 
Question 52 Explanation:
TCP sequence numbers and Acknowledgments:^{
1. A Sequence number is sent from the host and is total number of bytes sent UP to this point, during the conversation, not including the current payload
2. The acknowledgement number would be the total number of bytes received by the destination, FROM the sender, plus one (i.e. the one being the next byte it expects to get).
Initial Sequence number is needed in order to identify how many number of bytes received by receiver.
So the answer is optionD because of not mentioning of sequence number.
}
Question 53 
In a class B subnet, we know the IP address of one host and the mask as given below:
IP address: 125.134.112.66
Mask: 255.255.224.0
What is the first address(Network address)?
IP address: 125.134.112.66
Mask: 255.255.224.0
What is the first address(Network address)?
125.134.96.0  
125.134.112.0  
125.134.112.66  
125.134.0.0 
Question 53 Explanation:
Given
IP address: 125.134.112.66
Subnet Mask: 255.255.224.0
IP address in binary Form = 01111101 10000110 01110000 01000010
Subnet Mask in binary Form = 11111111 11111111 11100000 00000000
Every IP address has Network id and Host id,
We will get Network id by doing bitwise AND (&) operation with IP address and Subnet Mask
IP address: 125.134.112.66
Subnet Mask: 255.255.224.0
IP address in binary Form = 01111101 10000110 01110000 01000010
Subnet Mask in binary Form = 11111111 11111111 11100000 00000000
Every IP address has Network id and Host id,
We will get Network id by doing bitwise AND (&) operation with IP address and Subnet Mask
Question 54 
A certain population of ALOHA users manages to generate 70 request/sec. If the time is slotted in units of 50 msec, then channel load would be
4.25  
3.5  
350  
450 
Question 54 Explanation:
The number of requests generated by ALOHA users are 70 request/sec
The amount of time slotted in unit is 50 msec
The number of time slots for generating user requests in 1 second are 1000/50=20
The Channel load can be calculated dividing number of requests to the time slots Channel Load = 70/20=3.5
The amount of time slotted in unit is 50 msec
The number of time slots for generating user requests in 1 second are 1000/50=20
The Channel load can be calculated dividing number of requests to the time slots Channel Load = 70/20=3.5
Question 55 
Which statement is false?
PING is a TCP/IP application that sends datagrams once every second in the hope of an echo response from the machine being PINGED  
If the machine is connected and running a TCP/IP protocol stack, it should respond to the PING datagram with a datagram of its own  
If PING encounters an error condition, an ICMP message is not returned  
PING display the time of the return response in milliseconds or one of several error message 
Question 55 Explanation:
→ Ping operates by sending Internet Control Message Protocol (ICMP) echo request packets to the target host and waiting for an ICMP echo reply.
→ The program reports errors, packet loss, and a statistical summary of the results, typically including the minimum, maximum, the mean roundtrip times, and standard deviation of the mean.
→ The program reports errors, packet loss, and a statistical summary of the results, typically including the minimum, maximum, the mean roundtrip times, and standard deviation of the mean.
Question 56 
A router uses the following routing table:
A packet bearing a destination address 144.16.68.117 arrives at the router. On which interface will it be forwarded?
A packet bearing a destination address 144.16.68.117 arrives at the router. On which interface will it be forwarded?
eth0  
eth1  
eth2  
eth3 
Question 56 Explanation:
Question 57 
Which layers of the OSI reference model are hosttohost layers?
Transport, session, presentation, application  
Session, presentation, application  
Datalink, transport, presentation, application  
Physical, datalink, network, transport 
Question 57 Explanation:
Question 58 
Alpha and Beta testing are forms of
Acceptance testing  
Integration testing  
System testing  
Unit testing 
Question 58 Explanation:
Acceptance testing can mean one of two things:
A smoke test is used as a build acceptance test prior to further testing, e.g., before integration or regression.
Acceptance testing performed by the customer, often in their lab environment on their own hardware, is known as user acceptance testing (UAT). Acceptance testing may be performed as part of the handoff process between any two phases of development.
Alpha testing:
Alpha testing is simulated or actual operational testing by potential users/customers or an independent test team at the developers' site
. Alpha testing is often employed for offtheshelf software as a form of internal acceptance testing before the software goes to beta testing.
Beta testing
Beta testing comes after alpha testing and can be considered a form of external user acceptance testing. Versions of the software, known as beta versions, are released to a limited audience outside of the programming team known as beta testers.
The software is released to groups of people so that further testing can ensure the product has few faults or bugs. Beta versions can be made available to the open public to increase the feedback field to a maximal number of future users and to deliver value earlier, for an extended or even indefinite period of time (perpetual beta).
A smoke test is used as a build acceptance test prior to further testing, e.g., before integration or regression.
Acceptance testing performed by the customer, often in their lab environment on their own hardware, is known as user acceptance testing (UAT). Acceptance testing may be performed as part of the handoff process between any two phases of development.
Alpha testing:
Alpha testing is simulated or actual operational testing by potential users/customers or an independent test team at the developers' site
. Alpha testing is often employed for offtheshelf software as a form of internal acceptance testing before the software goes to beta testing.
Beta testing
Beta testing comes after alpha testing and can be considered a form of external user acceptance testing. Versions of the software, known as beta versions, are released to a limited audience outside of the programming team known as beta testers.
The software is released to groups of people so that further testing can ensure the product has few faults or bugs. Beta versions can be made available to the open public to increase the feedback field to a maximal number of future users and to deliver value earlier, for an extended or even indefinite period of time (perpetual beta).
Question 59 
The decimal number has 64 digits.The number of bits needed for its equivalent binary representation is?
200  
213  
246  
277 
Question 59 Explanation:
Consider three digits(1,2,3) of decimal numbers.Maximum number, we can generate by that three digits are 10^{3}1 which is 999.
Then, Decimal number has 64 digits, so maximum number is 10^{64}1
Similarly, in the binary representation with “n” bits the maximum number is 2^{n}1
So we can write 10^{64} –1 = 2^{n} – 1 >10^{64} = 2^{n}
After taking log_{2} on both sides
log_{2}2^{n}=log_{2}10^{64}
n log_{2}2=64 log_{ 2}10
n=64*(3.322) [ log_{2}2=1 & log_{2}10 =3.322]
n=212.608
n=213
Then, Decimal number has 64 digits, so maximum number is 10^{64}1
Similarly, in the binary representation with “n” bits the maximum number is 2^{n}1
So we can write 10^{64} –1 = 2^{n} – 1 >10^{64} = 2^{n}
After taking log_{2} on both sides
log_{2}2^{n}=log_{2}10^{64}
n log_{2}2=64 log_{ 2}10
n=64*(3.322) [ log_{2}2=1 & log_{2}10 =3.322]
n=212.608
n=213
Question 60 
In X = (M + N x O)/(P x Q), how many oneaddress instructions are required to evaluate it?
4  
6  
8  
10 
Question 60 Explanation:
All operations are performed with an implied accumulator register. The instruction format in this type of computer uses one address field. For example, the instruction that specifies an arithmetic addition is defined by an assembly language instruction as ADD.
Given instruction is
Instruction1: Load the value “M” into accumulator
Instruction2:Add the “N” value to M and store result into accumulator register
Instruction3:Multiply “O” with the accumulator register value and store in to accumulator register
instruction4: Store that result into Memory
Instruction5:Load/store the value “P” into accumulator register
instruction6:Multiply “Q” with the accumulator register value and store in to accumulator
instruction7:Divide the memory value with the accumulator register value and store in to accumulator
Instruction8: Store the accumulator value in the memory location.
Given instruction is
Instruction1: Load the value “M” into accumulator
Instruction2:Add the “N” value to M and store result into accumulator register
Instruction3:Multiply “O” with the accumulator register value and store in to accumulator register
instruction4: Store that result into Memory
Instruction5:Load/store the value “P” into accumulator register
instruction6:Multiply “Q” with the accumulator register value and store in to accumulator
instruction7:Divide the memory value with the accumulator register value and store in to accumulator
Instruction8: Store the accumulator value in the memory location.
Question 61 
The minimum time delay between the initiation of two independent memory operations is called
Access time  
Cycle time  
Rotational time  
Latency time 
Question 61 Explanation:
→ This is the minimum time delay between the initiation two independent memory operations (for example, two successive memory read operation).
→ Memory cycle time is slightly larger than memory access time.
→ Memory cycle time is slightly larger than memory access time.
Question 62 
Which of the following compression algorithms is used to generate a .png file?
LZ78  
Deflate  
LZW  
Huffman 
Question 62 Explanation:
→ Deflate is a lossless data compression algorithm and associated file format that uses a combination of the LZ77 algorithm and Huffman coding.
→ An algorithm producing Deflate files is widely thought to be implementable in a manner not covered by patents.
→ This has led to its widespread use, for example in gzip compressed files, PNG image files and the ZIP file format for which Katz originally designed it.
→ An algorithm producing Deflate files is widely thought to be implementable in a manner not covered by patents.
→ This has led to its widespread use, for example in gzip compressed files, PNG image files and the ZIP file format for which Katz originally designed it.
Question 63 
Dirty bit for a page in a page table
helps avoid unnecessary writes on a paging device  
helps maintain LRU information  
allows only read on a page  
None of the above 
Question 63 Explanation:
→ The dirty bit allows for a performance optimization i.e., Dirty bit for a page in a page table helps to avoid unnecessary writes on a paging device.
Question 64 
Which of the following is not an image type used in MPEG?
A frame  
B frame  
D frame  
P frame 
Question 64 Explanation:
A Group Of Pictures can contain the following picture types:
I picture (or) I frame (intra coded picture) – a picture that is coded independently of all other pictures. Each GOP begins (in decoding order) with this type of picture.
P picture (or) P frame (predictive coded picture) – contains motioncompensated difference information relative to previously decoded pictures. Each P picture can only reference one picture, and that picture must precede the P picture in display order as well as in decoding order and must be an I or P picture.
B picture (or) B frame (bi predictive coded picture) – contains motioncompensated difference information relative to previously decoded pictures. Each B picture can only reference two pictures, the one which precedes the B picture in display order and the one which follows, and all referenced pictures must be I or P pictures.
D picture or D frame (DC direct coded picture) – serves as a fastaccess representation of a picture for loss robustness or fastforward. D pictures are only used in MPEG1 video.
I picture (or) I frame (intra coded picture) – a picture that is coded independently of all other pictures. Each GOP begins (in decoding order) with this type of picture.
P picture (or) P frame (predictive coded picture) – contains motioncompensated difference information relative to previously decoded pictures. Each P picture can only reference one picture, and that picture must precede the P picture in display order as well as in decoding order and must be an I or P picture.
B picture (or) B frame (bi predictive coded picture) – contains motioncompensated difference information relative to previously decoded pictures. Each B picture can only reference two pictures, the one which precedes the B picture in display order and the one which follows, and all referenced pictures must be I or P pictures.
D picture or D frame (DC direct coded picture) – serves as a fastaccess representation of a picture for loss robustness or fastforward. D pictures are only used in MPEG1 video.
Question 65 
Consider an uncompressed stereo audio signal of CD quality which is sampled at 44.1 kHz and quantized using 16 bits. What is required storage space if a compression ratio of 0.5 is achieved for 10 seconds of this audio?
172 KB  
430 KB  
860 KB  
1720 KB 
Question 65 Explanation:
Given frequency = 44.1 kHz = 44100 bits per second and compression ratio = 0.5
This is stereo audio signal, it will need 2 channels. 16 bits used for quantized (converting to MP3)
Bit Rate = number channels * bits* frequency =2 x16 x 44100 = 1411200 bps
Compressed Bit Rate = 0.5x 1411200= 705600 bps ( It is for one second)
For 10 seconds,
Bit rate = 10 x 705600 bits
= 7056000bits
=882000 Bytes (7056000/8 & 1 Byte =8 bits)
= 882 KB (882000/1000& 1 KB=1000 bytes)
This is stereo audio signal, it will need 2 channels. 16 bits used for quantized (converting to MP3)
Bit Rate = number channels * bits* frequency =2 x16 x 44100 = 1411200 bps
Compressed Bit Rate = 0.5x 1411200= 705600 bps ( It is for one second)
For 10 seconds,
Bit rate = 10 x 705600 bits
= 7056000bits
=882000 Bytes (7056000/8 & 1 Byte =8 bits)
= 882 KB (882000/1000& 1 KB=1000 bytes)
Question 66 
What is compression ratio in a typical mp3 audio files?
4:1  
6:1  
8:1  
10:1 
Question 66 Explanation:
→ Compression efficiency of encoders is typically defined by the bit rate, because compression ratio depends on the bit depth and sampling rate of the input signal.
→ They may use the Compact Disc (CD) parameters as references (44.1 kHz, 2 channels at 16 bits per channel or 2×16 bit), or sometimes the Digital Audio Tape (DAT) SP parameters (48 kHz, 2*16 bit)
→ 2 channels of 16bit audio at 44.1KHz = 2*16* 44100
= 1411200 bits/sec
= 172 kbyte/sec
→ Compression ratio = 172/16
= 10.75 :1
= 11:1 (or) 10:1
→ They may use the Compact Disc (CD) parameters as references (44.1 kHz, 2 channels at 16 bits per channel or 2×16 bit), or sometimes the Digital Audio Tape (DAT) SP parameters (48 kHz, 2*16 bit)
→ 2 channels of 16bit audio at 44.1KHz = 2*16* 44100
= 1411200 bits/sec
= 172 kbyte/sec
→ Compression ratio = 172/16
= 10.75 :1
= 11:1 (or) 10:1
Question 67 
Consider the following program fragment
if(a > b)
if(b > c)
s1;
else
s2;
s2 will be executed if
if(a > b)
if(b > c)
s1;
else
s2;
s2 will be executed if
a <= b  
b > c  
b >= c and a <= b  
a > b and b <= c 
Question 67 Explanation:
Here, possibility to happen “dangling if” error. But according to else statement it is matched with above if statement only.
We can write code segment is like this because to avoid “dangling if”
if(a>b)
{
if(b>c)
{ s1; }
else
{ s2; }
}
→ To execute s2, it (a>b) should be TRUE. And it (b>c) should be FALSE.
Hence, OptionD is correct
We can write code segment is like this because to avoid “dangling if”
if(a>b)
{
if(b>c)
{ s1; }
else
{ s2; }
}
→ To execute s2, it (a>b) should be TRUE. And it (b>c) should be FALSE.
Hence, OptionD is correct
Question 68 
If n has 3, then the statement a[++n]=n++;
assigns 3 to a[5]  
assigns 4 to a[5]  
assigns 4 to a[4]  
what is assigned is compiler dependent 
Question 68 Explanation:
Given statement consists of three operators which are preincrement , postincrement and equal to operator. According to operator precedence and associativity, the order of operators evaluation is postincrement,preincrement and finally equal to operator.
But one variable value is modifying multiple times in the same expression means that behaviour is undefined behaviour which is compiler dependent.
Question 69 
The following program
main()
{
inc();
inc();
inc();
}
inc()
{
static int x;
printf("%d", ++x);
}
main()
{
inc();
inc();
inc();
}
inc()
{
static int x;
printf("%d", ++x);
}
prints 012  
prints 123  
prints 3 consecutive, but unpredictable numbers  
prints 111 
Question 69 Explanation:
In this question, we have to remind one point about “static” storage class.
Static storage class by default value is 0.
Step1: We are calling inc( ) in main function. So, it will enter into inc() function.
Here, we are using pre increment function, so it replaced 0 with 1.
Step2: Second inc() in main function. So, it will enter into inc() function.
Here, we are using pre increment function, so it replaced 1 with 2.
Step3: Third inc() in main function. So, it will enter into inc() function.
Here, we are using pre increment function, so it replaced 2 with 3.
Note: The static storage class instructs the compiler to keep a local variable in existence during the lifetime of the program instead of creating and destroying it each time it comes into and goes out of scope.
Static storage class by default value is 0.
Step1: We are calling inc( ) in main function. So, it will enter into inc() function.
Here, we are using pre increment function, so it replaced 0 with 1.
Step2: Second inc() in main function. So, it will enter into inc() function.
Here, we are using pre increment function, so it replaced 1 with 2.
Step3: Third inc() in main function. So, it will enter into inc() function.
Here, we are using pre increment function, so it replaced 2 with 3.
Note: The static storage class instructs the compiler to keep a local variable in existence during the lifetime of the program instead of creating and destroying it each time it comes into and goes out of scope.
Question 70 
Consider the following program fragment
i=6720;
j=4;
while (i%j==0)
{
i=i/j;
j=j+1;
}
On termination j will have the value
i=6720;
j=4;
while (i%j==0)
{
i=i/j;
j=j+1;
}
On termination j will have the value
4  
8  
9  
6720 
Question 70 Explanation:
Initial values of i and j are 6720 and 4 respectively
Iteration 1:
i=6720
j=4
i%j==0 which is 6720%4 ==0 condition is true then
i=i/j=6720/4=1680
j=j+1=5
Iteration2:
i=1630
j=5
i%j==0 which is 1680%5 ==0 condition is true then
i=i/j=1630/5=336
j=j+1=6
Iteration3: i=336
j=6
i%j==0 which is 336%6 ==0 condition is true then
i=i/j=336/6=56
j=j+1=7
Iteration4:
i=56
j=7
i%j==0 which is 56%7 ==0 condition is true then
i=i/j=56/7=8
j=j+1=8
Iteration5:
i=8
j=8
i%j==0 which is 8%8 ==0 condition is true then
i=i/j=8/8=1
j=j+1=9
Iteration6:
i=1
j=9
i%j==0 which is 1%9 ==0 condition is false.
At this iteration, the “j” value is 9.
Iteration 1:
i=6720
j=4
i%j==0 which is 6720%4 ==0 condition is true then
i=i/j=6720/4=1680
j=j+1=5
Iteration2:
i=1630
j=5
i%j==0 which is 1680%5 ==0 condition is true then
i=i/j=1630/5=336
j=j+1=6
Iteration3: i=336
j=6
i%j==0 which is 336%6 ==0 condition is true then
i=i/j=336/6=56
j=j+1=7
Iteration4:
i=56
j=7
i%j==0 which is 56%7 ==0 condition is true then
i=i/j=56/7=8
j=j+1=8
Iteration5:
i=8
j=8
i%j==0 which is 8%8 ==0 condition is true then
i=i/j=8/8=1
j=j+1=9
Iteration6:
i=1
j=9
i%j==0 which is 1%9 ==0 condition is false.
At this iteration, the “j” value is 9.
Question 71 
Consider the following declaration:
int a, *b=&a, **c=&b;
The following program fragment
a=4;
**c=5;
int a, *b=&a, **c=&b;
The following program fragment
a=4;
**c=5;
does not change the value of a  
assigns address of c to a  
assigns the value of b to a  
assigns 5 to a 
Question 71 Explanation:
In the given program fragment, three variables are there
Ordinary variable a // value will be stored
Pointer variable b // address of variable will be stored
Pointer to pointer variable(double pointer) c // address of pointer variable will stored.
a=4 means storing/assigning value to “a”.
**c means value at(value at(c)) =value at(value at(&b)) (c holds address of pointer “b”)
=value at(&a) (b holds the address of “a”)
Memory location of variable “a”, value 5 is stored/assigned into the variable.
Ordinary variable a // value will be stored
Pointer variable b // address of variable will be stored
Pointer to pointer variable(double pointer) c // address of pointer variable will stored.
a=4 means storing/assigning value to “a”.
**c means value at(value at(c)) =value at(value at(&b)) (c holds address of pointer “b”)
=value at(&a) (b holds the address of “a”)
Memory location of variable “a”, value 5 is stored/assigned into the variable.
Question 72 
The output of the following program is
main()
{
static int x[] = {1,2,3,4,5,6,7,8}
int i;
for (i=2; i<6; ++i)
x[x[i]]=x[i];
for (i=0; i<8; ++i)
printf("%d", x[i]);
}
main()
{
static int x[] = {1,2,3,4,5,6,7,8}
int i;
for (i=2; i<6; ++i)
x[x[i]]=x[i];
for (i=0; i<8; ++i)
printf("%d", x[i]);
}
1 2 3 3 5 5 7 8  
1 2 3 4 5 6 7 8  
8 7 6 5 4 3 2 1  
1 2 3 5 4 6 7 8 
Question 72 Explanation:
For loop will execute for the i value 2,3,4,5
For i = 2, x[x[2]] = x[2]
= x[3] = 3 // since x[2] = 3
The array elements representation are
Question 73 
Which of the following has the compilation error in C?
int n=17;  
char c=99;  
float f=(float)99.32;  
#include 
Question 73 Explanation:
Option A: General declaration of integer variable.
Option B: General declaration of character variable.
Option C: It is type casting. But given cast also same type.
Option D: We have to include a file otherwise it treated as compiler error.
Option B: General declaration of character variable.
Option C: It is type casting. But given cast also same type.
Option D: We have to include a file otherwise it treated as compiler error.
Question 74 
The for loop
for (i=0; i<10; ++i)
printf("%d", i&1);
prints:
for (i=0; i<10; ++i)
printf("%d", i&1);
prints:
0101010101  
0111111111  
0000000000  
1111111111 
Question 74 Explanation:
The loop will execute for 10 times, from “i” value 0 to 9
“&” is bitwise AND operator.
For a given i=0 , the value is 0&1 is 0000 & 0001 which is 0
i=1, 0001 & 0001 which is 1
i=2 , 0010 & 0001 which is 0
i=3 0011 & 0001 which is 1
i=4 , 0100 & 0001 which is 0
i=5 0101 & 0001 which is 1
i=6 , 1100 & 0001 which is 0
i=7 0111 & 0001 which is 1
i=8 , 1000 & 0001 which is 0
i=9 1001 & 0001 which is 1
So the output is 0101010101(from i=0 to 9)
“&” is bitwise AND operator.
For a given i=0 , the value is 0&1 is 0000 & 0001 which is 0
i=1, 0001 & 0001 which is 1
i=2 , 0010 & 0001 which is 0
i=3 0011 & 0001 which is 1
i=4 , 0100 & 0001 which is 0
i=5 0101 & 0001 which is 1
i=6 , 1100 & 0001 which is 0
i=7 0111 & 0001 which is 1
i=8 , 1000 & 0001 which is 0
i=9 1001 & 0001 which is 1
So the output is 0101010101(from i=0 to 9)
Question 75 
Consider the following statements
#define hypotenuse (a, b) sqrt(a*a+b*b);
The macro call hypotenuse(a+2,b+3);
Finds the hypotenuse of a triangle with sides a+2 and b+3  
Finds the square root of (a+2)^{2} and (b+3)^{3}  
Is invalid  
Find the square root of 3*a + 4*b + 5 
Question 75 Explanation:
Given macro call is hypotenuse(a+2,b+3)
Macro definition is
hypotenuse (a, b) sqrt (a*a+b*b)
Substitute a+2 and b+3 inplace of a and b respectively
Then
sqrt(a+2*a+2+b+3*b+3)
// operators are addition(+) and multiplication(*) present in the above expression
Multiplication (*) operators has highest priority than addition (+) and associativity is Left to right.
First 2*a is evaluated which is 2a Later 3*b which is 3b.
Then the expression becomes
sqrt(a+2a+2+b+3b+3)
=sqrt(3a+2+b+3b+3)
=sqrt(3a+4b+5)
Macro definition is
hypotenuse (a, b) sqrt (a*a+b*b)
Substitute a+2 and b+3 inplace of a and b respectively
Then
sqrt(a+2*a+2+b+3*b+3)
// operators are addition(+) and multiplication(*) present in the above expression
Multiplication (*) operators has highest priority than addition (+) and associativity is Left to right.
First 2*a is evaluated which is 2a Later 3*b which is 3b.
Then the expression becomes
sqrt(a+2a+2+b+3b+3)
=sqrt(3a+2+b+3b+3)
=sqrt(3a+4b+5)
Question 76 
If in a software project the number of user input, user output, enquiries, files and external interfaces are (15, 50, 24, 12, 8), respectively, with complexity average weighting factor.
The productivity if effort = 70 percentmonth is
The productivity if effort = 70 percentmonth is
110.54  
408.74  
304.78  
220.14 
Question 76 Explanation:
Given in question, average weighting factor.
=(External Inputs(EI)*4) + (External Output(EO) * 5) + (External Inquiries(EQ) * 4) + (External logical files(ILF) * 10) + (External Interface file(EIF) * 7)
=(15*4 + 50*5 + 24*4 +12*10 + 8*7
= 582
And, productivity month is 70%
=582*0.7
=407.4
Question 77 
Suppose two jobs, each of which needs 10 minutes of CPU time, start simultaneously. Assume 50% I/O wait time. How long will it take for both to complete, if they run sequentially?
10  
20  
30  
40 
Question 77 Explanation:
Given data,
2 jobs need 10 min CPU time,
50% IO waiting time
Step1: Here, total CPU time is IO operation time and execution time.
Step2: We can assume, CPU time = (IO operation time*execution time) =2 times
Step3: CPU running both the process is 10+10 mins.
1 CPU time=20 mins.
Step4: Need= 2 times *20 min
=40mins.
Note: Actual answer key, they given Option C
2 jobs need 10 min CPU time,
50% IO waiting time
Step1: Here, total CPU time is IO operation time and execution time.
Step2: We can assume, CPU time = (IO operation time*execution time) =2 times
Step3: CPU running both the process is 10+10 mins.
1 CPU time=20 mins.
Step4: Need= 2 times *20 min
=40mins.
Note: Actual answer key, they given Option C
Question 78 
If D_{1}, D_{2}…D_{n} are domains in a relational model, then the relation is a table, which is a subset of
D_{1}⊕D_{2}⊕…⊕D_{n}  
D_{1}xD_{2}x…xD_{n}  
D_{1}∪D_{2}∪…∪D_{n}  
D_{1}∩D_{2}∩…∩D_{n} 
Question 78 Explanation:
In D_{1},D_{2},..,D_{n} are domains in a relational model, then the relation is a table, which s a subset of D_{1}xD_{2}x..xD_{n}
Question 79 
The contents of the flag register after execution of the following program by 8085 microprocessor will be
Program
SUB A
MVI B,(01)_{H}
DCR B
HLT
Program
SUB A
MVI B,(01)_{H}
DCR B
HLT
(54)_{H}  
(00)_{H}  
(01)_{H}
 
(45)_{H} 
Question 79 Explanation:
Question 80 
The maximum length of an attribute of type text is
127  
255  
256  
It is variable 
Question 80 Explanation:
Correct answer is D. But actual key they given Option C is correct one.
There are 80 questions to complete.