Six Phrase - Myslate - Computer Fundamentals PDF
Six Phrase - Myslate - Computer Fundamentals PDF
Section Summary
No. of Questions: 280
Duration: 300 min
Additional Instructions:
None
Q1.
What is the maximum degree of any vertex in a simple graph with n vertices.?
a.2n-1
b.n-1
c.n+1
d.n
Q2. A sorting algorithm traverses through a list, comparing adjacent elements and switching them under certain conditions. What is this
sorting algorithm called?
Op 1: insertion sort
Op 2: heap sort
Op 3: quick sort
Op 4: bubble sort
Q3. Shahaana has a 10,000 line code. She is trying to debug it. She knows there is a
logical error in the rst 25 lines of the code. Which of the following will be an
ef cient way of debugging:
Op 4: None of these
Q4.
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 1/115
8/16/2019 Six Phrase - mySlate
Shashi writes a program in C++ and passes it on to Pankaj. Pankaj does some indentation in some statements of the code. What
will this lead to?
Op 1: Faster Execution
Op 3: Correction of errors
Op 4: Better readability
Q5. An array of 5 numbers has the following entries in order: 7 4 5 10 8. Prashant uses selection sort to sort this array in descending
order. What will the array contain after two iterations of selection sort?
10 8 7 5 4
10 8 5 7 4
8 10 5 7 4
None of these
A.7
B.5
D.4
Q7. Farhan writes a code to nd the factorial of an inputted number. His code
gives correct answer for some inputs and incorrect answers for others. What kind of
error does his program have?
Op 1: Syntactical error
Op 2: Run-time Error
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 2/115
8/16/2019 Six Phrase - mySlate
Op 3: Logical Error
Op 4: None of these
Q8.
What will be the output of the following pseudocode?
a. 0 1 3 8
b. 0 1 2 4
c. 0 1 2 3
d. 1 0 2 4
Q9. The average time required to perform a successful sequential search for an element in an array A(1 : n) is given by
Op 1: (n+1) / 2
Op 2: log2n
Op 3: n(n+1) / 2
Op 4: n2
A. x'+z
B. xyz
C. xy'+z
Op 1: 0 to 1000
Op 2: 0 to 1024
Op 3: 1 to 1025
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 3/115
8/16/2019 Six Phrase - mySlate
Op 4: 0 to 1023
stack
set
list
queue
Q13.
What will be the output of the following pseudocode for input a=8 and b=9?
Function(input a,input b)
if (a<b)
return function(b,a)
elseif (b!=0)
return(a+function(a,b-1))
else
return 0
a.56
b.88
c.72
e.65
a.inheritance
b.nested
c.container class
d.encapsulation
Q15.
Consider the following pseudo code
a:=1;
b:=1;
while (a<=500)
begin
a:=2^a;
b:=b+1;
end
What is the value of b at the end of the pseudo code?
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 4/115
8/16/2019 Six Phrase - mySlate
a.7
b.5
c.4
d.6
Q16.
What will be the output for the following pseudo code?
Input f=6,g=9 and set sum=0
Integer n
if(g>f)
for(n=f;n<g;n=n+1)
sum=sum+n
end for loop
else
print error message
print sum
a.15
b.21
c.9
d.6
Q17.
What will be the output of the following pseudocode?
Integer result and set num1=5,num2=7 and num3=6
If (num1>num 2)
If (num1>num3)
result=num1
else
result=num3
else if (num2>num3)
result= num2
else
result=num3
Print result
A.Error in logic
B.4
C.7
D.5
}
At which statement in this program will the compiler detect an error?
Op 1: Statement 1
Op 2: Statement 2
Op 3: Statement 3
Op 4: Statement 4
Q19. Two lists, A and B are implemented as singly linked link-lists. The address of the rst and last node are stored in variables rstA
and lastA for list A and rstB and lastB for list B. Given the address of a node is given in the variable node, the element stored in the
node can be accessed by the statement node->data and the address to the next node can be accessed by node- >next. Pankaj wants
to append list B at end of list A. Which of the following statements should he use?
lastA = rstB
lastA->next = rstB
lastB = rstA
Q20.
What will be the output of the following pseudocode?
Input a=6,b=9
Integer n
Set res =1
If(a>10 && b<a)
Print error message
Else
For(n=a; n<b; n=n+1)
Res= res* n
End for loop
Print res
NOTE: ‘&&’ operator returns true if and only if both expressions insideif() are true.
Example
If (6>5 && 12<10)
Print true
Else
Print False
The output will be ‘false’ as one expression(12<10)in if() is not true?
a.42
b.124
c.256
d.336
A.42
B.124
C.256
D.336
Q22. We have two programs. We know that the rst has a time complexity O(n2
),
while the second has a complexity &omega(n2
). For suf ciently large n, which of the
following cannot be true?
Op 2: The rst code has higher time complexity than the second
Op 3: The second code has lower time complexity than the rst code.
Q23.
what will be the output of the following code if the value of n1 and n2 are 12,30 respectively?
Declare integer variables n1,n2 ,I ,j and ag
Read the values of n1 and n2
For i=n1+1 to (n2-1)
Set ag equals to 1
For j=2 to i/2
If I mod j equals to 0 then set ag =0
Break
End if
End for
If ag equals to 1 then print i
End if
Set i=i+1
End for
Stop
b. 13 17 19 23 29
c.13 15 17 19 21 23 25 27 29
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 7/115
8/16/2019 Six Phrase - mySlate
d.12 15 18 21
Q24.
which of the following applications may use a stack?
10(R) 13(F)
5(R) 10(F)
13(R) 10(F)
10(R) 5(F)
Q27. Sharmili wants to make a program to print the sum of all perfect cubes, where
the value of the cubes go from 0 to 100. She writes the following program:
integer i = 0, a // statement 1
integer sum = 0;
a=(i*i*i)
while ( i < 100 ) // statement 2
{
sum = sum + a // statement 3
i=i+1
a = ( i * i * i ) // statement 4
}
print sum
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 8/115
8/16/2019 Does this program have an error? If yes, which one statement will- mySlate
Six Phrase you modify to
correct the program?
Op 1: Statement 1
Op 2: Statement 2
Op 3: Statement 3
Op 4: Statement 4
Q28. Which of the following abstract data types can be used to represent a many to-many relation?
Tree
Stack
Graph
Queue
Q29. Ankita takes as input 2 integer numbers, a and b, whose value can be between
0 and 31. He stores them as 5 bit numbers. He writes the following code to process
these numbers to produce a third number c.
c = 2*(a - b)
In how many minimum bits should Ankita store c?
Op 1: 6 bits
Op 2: 7 bits
Op 3: 8 bits
Op 4: 9 bits
Q30. Assuming n > 2, What value does the following function compute for odd n?
function f (int n)
{
if (n equals 1) { return 1 }
if (n equals 2) { return f(n-1) + n/2 }
return f(n-2) + n;
}
Op 1: 1 + 2 + 3 + 4 + ... + n
Op 2: 1 + 3 + 5 + 7 + ... + n
Op 3: n/2 + (1 + 3 + 5 + 7 + ... + n)
Op 4: 1 + (1 + 3 + 5 + 7 + ... + n)
Q32. Neelam wants to share her code with a colleague, who may modify it. Thus she wants to include the date of the program creation,
the author and other information with the program. What component should she use?
Op 1: Header les
Op 1: Header les
Op 3: Comments
Op 4: Preprocessor directive
Q33. What is the maximum degree of any vertex in a simple graph with n vertices?
A. n
B. 2n-1
C. 2n+1
D. n-1
Q34. Tanuj writes the code for a function that takes as input n and calculates the
sum of rst n natural numbers.
Function sum( n )
{
if(??)
return 1
else
return (n + sum(n-1))
end
}
Fill in ?? in the code.
Op 1: n equals 1
Op 2: n equals 2
Op 3: n >= 1
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 10/115
8/16/2019 Six Phrase - mySlate
Op 4: n > 1
Q35. The algorithm design technique used in the quick sort algorithm is
Op 1: Dynamic programming
Op 2: Back tracking
Op 4: Greedy Search
Q36.
comment on the output of the following c code ?
#include<stdio.h>
Void main()
{
Int k=4;
Int *const p=&k;
Int r=3;
P=&r;
Printf(“%d”,p);
}
Q37.
what will be the output of the following pseudo code for input 7?
Read the value of N
Set m=1, T=0;
If m>n
Go to line no 9
Else
T=T+m
M=m+1
Go to line no 3
Display the value of T
Stop
a.28
b.76
c.32
d.56
Q38.
What is the output of the following C code?
#include <stdio.h>
Union sti
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 11/115
8/16/2019 { Six Phrase - mySlate
Int nu;
Char m;
};
Int main()
{
Union sti s;
Printf(“%d”,size of(s));
Return 0;
}
a.12
b.4
c.16
d.5
a.none of these
Q40.
What will be the output of the following pseudo code for the given array a[5]=3,4,6,1,2 and pos is 2?(Note: n=the size of the array)
Declare I,j,n,pos
Repeat for j=pos to n-1
Set a[j]=a[j+1](end of the loop)
n=n-1;
Display the new array
end
a. 3 4 2 1 2
b. 3 4 1 2
c.3 2 4 6 1 2
d. 3 6 1 2
Q41. Vibhu is given two codes, A and B, to solve a problem, which have complexity
O(n4
) and &omega(n3
) respectively. Her client wants to solve a problem of size k,
which is suf ciently large. Which code will Gautam deliver to the client, so that the
execution is faster?
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 12/115
8/16/2019 Six Phrase - mySlate
Op 1: Code A
Op 2: Code B
Op 4: None of these
Q43. Prashant takes as input 2 integer numbers, a and b, whose value can be
between 0 and 127. He stores them as 7 bit numbers. He writes the following code
to process these numbers to produce a third number c.
c=a-b
In how many minimum bits should Prashant store c?
Op 1: 6 bits
Op 2: 7 bits
Op 3: 8 bits
Op 4: 9 bits
Q44. Press the enter key in all of the circumstances except _________
Q45. what will be the necessary condition to get desired element from a given array by using the following algorithm?
IF LOC = -1 do ITEM NOT FOUND
Do_Something(DATA, N, ITEM, LOC)
Initialize counter set LOC=0, LOW=0, HI=N-1
[Search for item] Repeat while LOW<= HI
MID=(LOw+HI)/2
IF ITEM = DATA[MID] do
LOC = MID
Return LOC
IF ITEM < DATA [MID]
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 13/115
8/16/2019 HI=MID -1 Six Phrase - mySlate
ELSE
lOW=MID +1
Q46. What will be the output of the following pseudo code for input 7?
Read the value of N.
set m=1,T=0
If m>N
Go to line no.9
else
T=T+m
m=m+1
go to line no.3
display the value of T
stop
A.28
B.32
C.56
D.76
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 14/115
8/16/2019 Six Phrase - mySlate
top< N
top <n-1
top > 0
top > 1
A. 3
B. 1
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 15/115
8/16/2019 Six Phrase - mySlate
C. 2
D. 4
Q51. A language has 28 different letters in total. Each word in the language is
composed of maximum 7 letters. You want to create a data-type to store a word of
this language. You decide to store the word as an array of letters. How many bits will
you assign to the data-type to be able to store all kinds of words of the language.
Op 1: 7
Op 2: 35
Op 3: 28
Op 4: 196
Q52. A data type is stored as an 6 bit signed integer. Which of the following cannot
be represented by this data type?
Op 1: -12
Op 2: 0
Op 3: 32
Op 4: 18
Q53. There are two matrices A and B of size nXn. The data in both these matrices
resides only at positions where both the indices are a perfect square. Rest all
positions have 0 as the data. Manuj has available a third matrix initialized with 0's at
all positions. He writes an ef cient code to put the sum of A and B in C. What is the
time complexity of Manuj's program?
Op 1: &theta(n^2)
Op 2: &theta(n)
Op 3: &theta(n1/2)
Op 4: &theta(log(n))
Q54. Which of the following statements are true about a doubly-linked list?
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 16/115
8/16/2019 Six Phrase - mySlate
It will occupy same memory space as that of linear linked list, both
having same number of nodes
None of these
Op 1: 120
Op 2: 125
Op 3: 255
Op 4: 250
Q56. Assuming n > 2, What value does the following function compute for even n?
int f (int n)
{
if (n equals 1) { return 1 }
if (n equals 2) { return f(n-1) + n/2 }
return f(n-2) + n
}
Op 1: 1 + 2 + 3 + 4 + ... + n
Op 2: 1 + (2 + 4 + 6 + 8 + ... + n)
Op 3: 1 + n/2 + (4 + 6 + 8 + ... + n)
Op 4: 2 + 4 + 6 + 8 + ... + n
Q57. How many comparisons are needed to sort an array of length 5 if a straight selection sort is used and array is already in the
opposite order?
Op 1: 1
Op 2: 10
Op 3: 50
Op 4: 20
Q58. Tarun wants to write a code to divide two numbers. He wants to warn the user and terminate the program if he or she enters 0 as the
divisor. Which programming construct can he use to do this?
Op 1: Iteration
Op 2: Decision-making
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 17/115
8/16/2019 Six Phrase - mySlate
Op 3: Recursion
Op 4: None of these
Op 1: 65
Op 2: 60
Op 3: Error
Op 4: 70
Q60. Rohan writes the following program which inputs a number and prints "Triple
digit" if the number is composed of three digits and "Not triple digit" if it is not.
int number;
if (number>99)
print "Triple digit"
else
print "Not triple digit"
end if
Rohan tries the following inputs: 25 and 566. The program works ne. He asks his
brother Ravi to try the program. When Ravi enters a number, the program doesn't
work correctly. What did Ravi enter?
Op 1: 99
Op 2: 100
Op 3: 0
Op 4: 1000
Q61. What will be the output of the following pseudocode for input a = 8 and b = 9?
A. 65
C. 72
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 18/115
8/16/2019 Six Phrase - mySlate
D. 56
E. 88
Q63. Saloni writes the code for a function that takes as input n, an even integer and
calculates the sum of rst n even natural numbers.
function sum( n )
{
if(n equals 2)
return 2
else
return (n + sum(n-2))
end
}
She then calls the function by the statement, sum(30). How many times will the
function sum be called to compute this sum.
Op 1: 1
Op 2: 30
Op 3: 15
Op 4: 16
Q64.
What will be the probability of selecting a random node from a given singly linked list?(Assume that there are n nodes in the list)
a.2(n-1)/n
b.n/2(n-1)
c.2n-1
d.1/n
Q65.
Suppose queue is implemented using a linked list and its front node and rear nodes are tracked by two reference variables. Which of
these reference variable will change during an insertion into a non empty queue?
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 19/115
8/16/2019 Six Phrase - mySlate
Q66. A new language has 15 possible letters, 8 different kinds of punctuation marks
and a blank character. Rahul wants to create two data types, rst one which could
store the letters of the language and a second one which could store any character in
the language. The number of bits required to store these two data-types will
respectively be:
Op 1: 3 and 4
Op 2: 4 and 3
Op 3: 4 and 5
Op 4: 3 and 5
Op 1: (n - m + 1)/2
Op 2: 1 + (n - m)/2
Op 1: 80
Op 2: 40
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 20/115
8/16/2019 Six Phrase - mySlate
Op 3: 32
Op 4: 72
Q69.
Consider a Binary Tree having two pointers for each of its children. These pointers are set to NULL if the corresponding child is
empty. How many NULL pointers does a binary tree with N nodes have?
a. N-1
c. N
d. N+1
Op 1: 48
Op 2: Error
Op 3: 84
Op 4: 44
a. 0,1,2
b. 2,2,2
c. 0,2,2
d. 1,1,2
Op 1: Before it is declared
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 21/115
8/16/2019 Six Phrase - mySlate
Op 2: After it is declared
Q74. ------------ helps in capturing the data and entering into computer system.
output device
input device
multicast device
unicast device
Q75. When word ag a possible spelling or grammar error, it also changes mark on the spelling and grammar
status icon to _____________
a) red x
d) green x
Q76. Rajiv wants to make a program which inputs two numbers: a and b (a>b)
and computes the number of terms between a and b (including a and b). What will
be code statement to do this:
Op 1: a - b
Op 2: a - b + 1
Op 3: a + b
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 22/115
8/16/2019 Six Phrase - mySlate
Op 4: a - b - 1
Q78.
What will be output of the following pseudocode?
Input:s
algorithm(integer num)
set integer i=2
while i<=num/2
if num mod i=0
print”Unsuccessful” and exit;
i=i+1
if (i==(num/2)+1)
print”Successfull”
a.Successful
b.Unsuccessful
Q79.
which of the following statements is /are TRUE for undirected graph?
P: Number of odd degree vertices is even
Q: sum of degree of all vertices is even
b. neither P nor Q.
C. Q only.
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 23/115
8/16/2019 Six Phrase - mySlate
d. P only.
Q80.
What will the output of the following c code ?
#include<stdio.h>
Int main()
{
Int x=2,y=0,z=3;
x>y ? printf(“%d”,z);
return z;
}
a. compilation error
b. 3
c.1
d. Runtime error
Q81. The time required to insert an element in a stack with linked list implementation is
Op 1: O (1)
Op 2: O (log2 n)
Op 3: O (n)
Op 4: O (n log2 n )
Q82. Which one of the following is the lowest level format to which the computer
converts a higher language program before execution?
Op 1: English code
Op 2: Machine Code
Op 3: Assembly Language
Op 4: System Language
Q83. If you want to write a function that swaps the values of two variables, you
must pass them by:
Op 1: Value only
Op 2: Reference only
Op 3: Either A or B
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 24/115
8/16/2019 Six Phrase - mySlate
Op 4: Neither A nor B
Q84. Abhinav wants to nd the largest number in a given list of 20 numbers. Which
of the following is an ef cient approach to do this?
Op 1: Use bubble sort to sort the list in descending order and then print the rst
number of the series.
Op 2: Use selection sort to sort the list in descending order and then print the rst
number of the series.
Op 3: Implement one iteration of selection sort for descending order and print the
rst number in the series.
Op 4: None of these
Op 5:
Correct Op : 3
Ques35. Lavanya wants to nd the smallest number out of 26 inputted numbers. How
many minimum comparisons he has to make?
Op 1: 25
Op 2: 13
Op 3: 26
Op 4: 52
#include<stdio.h>
int main ()
{
int x = 4, y = 0;
int z;
z = (y++, y);
printf ("%d\n", z);
return 0;
A. 1
B. 0
D. Compilation error
Q86. Gautam is given two codes, A and B, to solve a problem, which have
complexity &theta(n) and &theta(n2
) respectively. His client wants to solve a problem
of size k, which Gautam does not know. Which code will Gautam deliver to the client,
so that the execution is faster?
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 25/115
8/16/2019 Six Phrase - mySlate
Op 1: Code A
Op 2: Code B
Q87. The best sorting methods if number of swapping done is the only measure of ef ciency is
Bubble sort
Selection sort
Insertion sort
Quick sort
Q88.
Identify the point that is not true with respect to stack?
a.It is not possible to insert or remove elements anywhere else except the top
of the stack.
b.stack is a dynamic set where elements are removed in the reverse order of
their insertions.
Q89. The array A has n elements. We want to determine the position of X in the array. We know that X is present in the array A and X can
be present at any location in the array with equal probability. How many comparisons will be required on average to nd the element
X using linear search?
n
(n+1)/2
2*n
n^2
Q90.
Maximum height of an AVL tree with 7 node is?
a.5
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 26/115
8/16/2019 Six Phrase - mySlate
b.4
c.6
d.3
Op 4: Loops forever
Q92. The average search time of hashing with linear probing will be less if the load factor
Op 2: equals one
Op 4: none of these
Q93. For solving a problem, which of these is the rst step in developing a working program for it?
Op 4: Code debugging
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 27/115
8/16/2019 Six Phrase - mySlate
A. 6
B. 10
C. 15
D. 5
A.65
B.85
C.75
D.55
Input : 5
Algorithm(integer num)
Set integer i = 2
while i<=num/2
if num mod i = 0
print “Un-successful” and exit;
i = i+1
if ( i==(num/2)+1)
print “Successful”
A. Successful
B. Un-successful
a.85
b.75
c.65
d.55
Q98. Identify the point that is NOT true with respect to a Stack.
A. It is not possible to insert or remove elements anywhere else except the top
of the stack
B. Stack is a dynamic set where elements are removed in the reverse order of
their insertions
Op 1: 50
Op 2: 200
Op 3: 35
Op 4: 20
Q100. Which of the following statements is/are TRUE for undirected graphs?
A. Both of P and Q
B. Neither P nor Q
C. Q only
D. P only
Q101. There is an array of size n initialized with 0. Akanksha has to write a code
which inserts the value 3k at position 3k in the array, where k=0,1...(till possible).
Akanksha writes an ef cient code to do so. What is the time complexity of her code?
Op 1: &theta(n^2)
Op 2: &theta(n)
Op 3: &theta(log3(n))
Op 4: &theta(3n)
Q102. What is the output of the following code statements? The compiler saves the
rst integer at the memory location 4165 and the rest at consecutive memory spaces
in order of declaration. Integer is one byte long.
integer a, b
pointer c, d
a = 30
c = &a
b = *c
a = a + 10
print b
Op 1: 30
Op 2: 4165
Op 3: 40
Op 4: 4166
A. 1
B. Runtime Error
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 30/115
8/16/2019 Six Phrase - mySlate
D. 3
Q104. Jaswinder has a book of tickets and wants to store ticket numbers in a data structure. New tickets are added to the end of the
booklet. Ticket at the top of the stack is issued to the customer. Which data structure should Jaswinder use to represent the ticket
booklet? Op 1: Queue Op 2: Stack Op 3: Array Op 4: Graph
Queue
Stack
Array
Graph
Op 1: 8
Op 2: i
Op 3: 2*i
Op 4: 4
Q106. If L is left node, M is middle node, R is right node then an L-M-R traversal can be termed as_____
A) post order
b) in order
c) preorder
both 1 and 3
A. 6
B. 4
C. 3
D. 5
A. 0 1 3 8
B. 1 0 2 4
C. 0 1 2 3
D. 0 1 2 4
Q110. Find out the number of interchanges needed to convert the given array into a max-heap.
89,19,50,17,12,15,2,5,7,11,6,9,100
A. 2
B. 3
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 32/115
8/16/2019 Six Phrase - mySlate
C. 5
D. 4
Q111. Every element of a data structure has an address and a key associated with it. A search mechanism deals with two or more values
assigned to the same address by using the key. What is this search mechanism?
Op 1: Linear Search
Op 2: Binary search
Op 4: None of these
Op 1: 10111101
Op 2: 00101111
Op 3: 10111000
Op 4: 00101101
Q113. Geetika writes a piece of code, where a set of eight lines occur around 10
times in different parts of the program (Code A). She passes on the code to Deva.
Deva puts the set of eight lines in a function de nition and calls them at the 10
points in the program (Code B). Which code will run faster using an interpreter?
Op 1: Code A
Op 2: Code B
Op 4: None of these
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 33/115
8/16/2019 Six Phrase - mySlate
Op 1: integer
Op 2: character
Op 3: boolean
Op 4: array
Q116.
What will be the output of the following code ?
Main()
{
Int num[]={1,4,8,12,16};
Int *a,*b;
Int I;
A=num;
B=num+2;
I = *a++;
Printf(“%d,%d,%d\n”,I,*a,*b);
}
a.4,4,8
b.2,4,8
c.1,4,8,
d.2,1,8
Q117.
what will be the output of the following algorithm?
Start
Declare a,I,and b
For I=0 to 4
Increment a by 1
If I=3 then
Print hello
Get out of the loop
End if
End for
Print a
a. hello4
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 34/115
8/16/2019 Six Phrase - mySlate
b. hello
c. 1
d. 4
Op 1: 11 -5
Op 2: 10 -5
Op 3: 6 -5
Op 4: 5 -5
Op 1: integer
Op 2: boolean
Op 3: oat
Op 4: character
Q120. Pankaj stores n data elements in a hash table. He is able to get the best ef ciency achievable by a hash table. What is the time
complexity of accessing any element from this hash table?
Op 1: O(1)
Op 2: O(n2)
Op 3: O(log n)
Op 4: O(n)
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 35/115
8/16/2019 Six Phrase - mySlate
Q121. Consider the following code:
function modify(y,z)
{
y=y+1
z=z+1
return y - z
}
function calculate( )
{
integer a = 12, b = 20, c
c = modify(a, b);
print a
print space
print c
}
Assume that a and b were passed by reference. What will be the output of the
function calculate( ) ?
Op 1: 12 -8
Op 2: 13 -8
Op 3: 12 8
Op 4: 13 8
Q122. Consider a binary tree having two pointers for each of its children.these pointer are set to NULL if the corresponding child is
empty.how many NULL pointer does a binary tree with ‘N’ nodes have?
A.N+1
C.N-1
D.N
Q123.
What will be output of the following algorithm for the input x=22 and y=3?
Start
Declare x,y,m,n
Set m=x and n=y
While m not equal to n then
If m greater than n
M=m-1
Otherwise
N=n-1
End if
End while
Print n
a.12
b.3
c.4
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 36/115
8/16/2019 Six Phrase - mySlate
Q125. Parul takes as input two numbers: a and b. a and b can take integer values
between 0 and 255. She stores a, b and c as 1-byte data type. She writes the
following code statement to process a and b and put the result in c.
c = a + 2*b
To her surprise her program gives the right output with some input values of a and b,
while gives an erroneous answer for others. For which of the following inputs will it
give a wrong answer?
Op 1: a = 10 b = 200
Op 2: a = 200 b = 10
Op 3: a = 50 b = 100
Op 4: a = 100 b = 50
Q126.
Find out the number of interchanges needed to convert the given array into a max-heap.
89,19,50,17,12,15,2,5,7,11,6,9,100
a.2
b.5
c.3
d.4
Q127. Saumya writes a code which has a function which calls itself. Which
programming concept is Saumya using?
Op 2: Recursion
Op 3: Decision Making
Op 4: Overloading
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 37/115
8/16/2019 Six Phrase - mySlate
Q128. Vikram wants to write a program which checks whether the inputted number
is divisible by any of the rst 6 natural numbers (excluding 1). He writes the following
ef cient code for it.
int number, n = 2, isdivisible=0
input number
while ( n <=6) // Statement 1
{
if ( remainder (number, n) == 0)
isdivisible = 1
end
n = n+1 // Statement 2
}
if (isdivisible equals 1)
print "It is divisible"
else
print "It is not divisible"
end
Vikram takes the program to Hari. Hari tells Vikram that though the code is correct, it
can be made more ef cient. Hari modi es a single statement and makes the code
more ef cient. Which statement does he modify and how?
Q129. Suppose queue is implemented using a linked list and its font node and rear nodes are tracked by two reference variables. Which of
these reference variables will change during an insertion into a NONEMPTY queue?
Q130. Pankaj and Mythili were both asked to write the code to evaluate the
following expression:
a - b + c/(a-b) + (a-b)2
Pankaj writes the following code statements (Code A):
print (a-b) + c/(a-b) + (a-b)*(a-b)
Mythili writes the following code statements (Code B):
d = (a-b)
print d + c/d + d*d
If the time taken to load a value in a variable, for addition, multiplication or division
between two operands is same, which of the following is true?
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 38/115
8/16/2019 Six Phrase - mySlate
A. 6
B. 21
C. 15
D. 9
Q132. Which of the following data structure may give over ow error, even though
the current number of element in it is less than its size ?
Op 4: none of these
Q133. Tarang writes an ef cient program to add two upper triangular 10X10 matrices
(elements on diagonal retained). How many total additions will his program make?
Op 1: 100
Op 2: 55
Op 3: 25
Op 4: 10
Q134. The maximum number of nodes on level I of a binary tree is which of the following? (Root is Level 1)
2l-1
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 39/115
8/16/2019 Six Phrase - mySlate
3l-1
2l
2l - 1
Q135. An array contains the following elements in order: 7 6 12 30 18. Insertion sort is used to sort the array in ascending order. How many
times will an insertion be made?
2
Q137. Which of the following data structure may give over ow error, even though the current number of element in it is less than its size ?
None of these
Op 1: radix search
Op 3: recursion
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 40/115
8/16/2019 Six Phrase - mySlate
Op 4: none of these
Q139. what will be the output of the following pseudocode for input a=8 and b=9?
function(input a,input b)
if(a<b)
return function(b,a)
elseif(b!=0)
return(a+function(a,b-1))
Else
Return 0;
A.88
B.72
C.65
E.56
Q140. There are two loops which are nested. This implies which one of the following?
Q141. A company offers commission for selling it products to its salesperson. The
commission rate is Rs. 5 per product. However if the salesperson sells more than 200
items, he gets a commission of Rs. 10 on all items he sold after the rst 200. Kanu
writes a program to calculate the commission for the salesperson:
integer numberProducts, commission
input numberProducts
if ( numberProducts > 200 )
-- MISSING STATEMENT --
else
commission = numberProducts * 5
end if
print commission
Fill in the missing statement.
Op 3: commission = numberProducts * 10
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 41/115
8/16/2019 Six Phrase - mySlate
Op 4: None of these
Q142. 32.The number of full and half adders required to add 16-bit numbers is:
Q143. Rajni wants to create a data-type for the number of books in her book case.
Her shelf can accommodate a maximum of 75 books. She allocates 7 bits to the datatype.
Later another shelf is added to her book-case. She realizes that she can still use
the same data-type for storing the number of books in her book-case. What is the
maximum possible capacity of her new added shelf?
Op 1: 52
Op 2: 127
Op 3: 53
Op 4: 75
DATA1234
b.234
c.1234
d.A1234
16
12
13
14
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 42/115
8/16/2019 Six Phrase - mySlate
Q146. In the following sorting procedures, which one will be the slowest for any given array?
Op 1: Quick sort
Op 2: Heap sort
Op 3: Merge Sort
Op 4: Bubble sort
Q147. Which of the following statements are true about a doubly-linked list?
Op 3: it will occupy same memory space as that of linear linked list, both
having
same number of nodes
Op 4: None of these
Op 1: Insertion sort
Op 2: Binary search
Op 3: Queue implementation
Op 4: None of these
Q149. Srishti writes a program to nd an element in the array A[5] with the following elements in order: 8 30 40 45 70. She runs the
program to nd a number X. X is found in the rst iteration of binary search. What is the value of X?
40
70
30
Q150. Which of the following sorting algorithms yield approximately the same worstcase and average-case running time behaviour in O (n
log n)?
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 43/115
8/16/2019 Six Phrase - mySlate
Op 1: Compiler
Op 2: Interpreter
Op 3: Assembler
Op 4: Simulator
a.0 or 1
b.0
c.1
d.none of these
Op 1: 1
Op 2: 0
Op 3: -1
Op 4: 10
A. multicast,unicast
B. multicast,broadcast
C. broadcast,unicast
D. broadcast,multicast
Q157. which of the following combinations of the variables x,y,z makes the variable ‘a’ get the value 4 In the following expression? A=
(x>y)?((x>z)?x:z):( (y>z)?y:z)
a.x=3;y=4;z=2
b.x=6;y=5;z=3
c.x=5;y=4;y=5
d.x=6;y=3;z=5
Q158. Afzal writes a piece of code, where a set of three lines occur around 10 times
in different parts of the program. What programming concept can he use to shorten
his program code length?
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 45/115
8/16/2019 Six Phrase - mySlate
Op 2: Use functions
Op 3: Use arrays
Op 4: Use classes
Op 1: 468
Op 2: 480
Op 3: 478
Op 4: 467
Start
Declare a, I and b
for I = 0 to 4
Increment a by 1
if I = 3 then
Print5 hello
Get out of the loop
End if
End for
Print a
A. 4
B. 1
C. hello
D. hello4
65
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 46/115
8/16/2019 Six Phrase - mySlate
15
56
51
Q162. Consider the statement while (a < 10.0) { a = a*a } Assuming a is positive, for what value of a will this code statement result in an
in nite loop?
a < 1.0
a < sqrt(10)
a > sqrt(10)
a=0
Op 1: 1 + n
Op 2: 1 + 2 + 3 + ... + n
Op 3: 1 + n, if n > 1, 1 otherwise
Q165. There is a new data-type which can take as values natural numbers between
(and including) 0 and 25. How many minimum bits are required to store this datatype.
Op 1: 4
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 47/115
8/16/2019 Six Phrase - mySlate
Op 2: 5
Op 3: 1
Op 4: 3
Q166. Ravi is writing a program in C++. C++ uses the 'for' keyword for loops. Due to
distraction, Ravi writes 'gor' instead of 'for'. What will this result to?
Op 3: The code may work for some inputs and not for others.
a.111100000
b.111010000
c.101110000
d.110110000
Q168.
What will be output of the following given statements.
Declare the integer variables x,y,z.
if x>y.if z>y
Display”One”
else
if z is equal to x
Display”two”
else
Display”three”
else Display”four”
Q169. In a sequential programming language, code statements are executed in which order?
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 48/115
8/16/2019 Six Phrase - mySlate
Op 4: None of these
Q170. What is the output of the following code statements? The compiler saves the
rst integer at the memory location 4165 and the rest at consecutive memory spaces
in order of declaration. Integer is one byte long.
integer a
pointer c, d
a = 30
c = &a
d=c
a = a + 10
print *c
Op 1: 30
Op 2: 4165
Op 3: 40
Op 4: 4166
Q171. Code A has to execute 4*n2 + 64 program statements, while Code B has to
execute 32*n program statements for a problem of size n. The time for executing a
single program statement is same for all statements. Rajesh was given a problem
with a certain size k and he delivered Code A. What could be the possible value of k?
Op 1: 1000
Op 2: 5
Op 3: 10
Op 4: 3
Op 3: Loops forever
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 49/115
8/16/2019 Six Phrase - mySlate
Q173.
What will be the output of the following C program?
#include<stdio.h>
Int main()
{
Int a=0,i=0,b;
For(i=0;i<5;i++)
{
a++;
If(i==3)
(“hello world”);
Break;
}
Printf(“%d”,a);
Return 0;
}
a.2
b.1
c.hello world
d.4
Q174. Pavithra is given two codes, A and B, to solve a problem, which have
complexity &theta(n3
) and &omega(n3
) respectively. Her client wants to solve a
problem of size k, which is suf ciently large. Which code should she deliver to the
client in the present scenario?
Op 1: Code A
Op 2: Code B
Op 4: None of these
Op 1: is always even
Op 2: always odd
Op 4: always zero
Q176.
What does the run() do in general?
1. int fun ( int x, int y)
2. {
3. if ( y = = 0) return 0;
4. return (x + fun (x, y-1));
5. }
6.
7. int run ( int a, int b)
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 50/115
8/16/2019 8. { Six Phrase - mySlate
9. if ( b == 0) return 1;
10. return fun ( a, b-1));
11. }
A.calculate X+X*Y
B.calculate X^Y
C. calculate X*Y
D. calculate y ^ X
Op 1: Compiler, Interpreter
Op 2: Interpreter, Compiler
Op 3: Compiler, Compiler
Op 4: Interpreter, Interpreter
Op 1: Always +1
Op 4: 0 if a equals b, -1 otherwise
Q179. The construct "if (condition) then A else B" is for which of the following purposes?
Op 1: Decision-Making
Op 2: Iteration
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 51/115
8/16/2019 Six Phrase - mySlate
Op 3: Recursion
a.4
b.1
c.2
d.6
Q181. The construct "if (condition) then A else B" is for which of the following purposes?
Op 1: Decision-Making
Op 2: Iteration
Op 3: Recursion
Q182.
What would be the output of the following c code?
#include<stdio.h>
Int main()
{
Int x=4,y=0;
Int z;
Z=(y++,y);
Printf(“%d\n”,z);
Return 0;
}
a.1
c.0
d.compliation error
Q183. Identify the point that is NOT true with respect to a queue?
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 52/115
8/16/2019 Six Phrase - mySlate
a.deletion from the queue happens only at the tail of the queue.
c.none of these
Op 1: Decision-Making
Op 2: Iteration
Op 3: Recursion
Op 4: None of these
Q185. Which of the OSI model is responsible for compression and decompression
a)presentation layer
b)transport layer
c)application layer
d)session layer
Q186. Shrishti writes the code for a function that computes the factorial of the
inputted number n.
function factorial(n)
{
if(n equals 1)
return 1
else
-- MISSING STATEMENT --
end
}
Fill in the missing statement.
Op 1: return factorial(n-1)
Op 2: return n*factorial(n)
Op 3: return n*(n-1)
Op 4: return n*factorial(n-1)
Op 1: 7
Op 2: -7
Op 3: Error
Op 4: 8
Q188. As part of the maintenance work, you are entrusted with the work of rearranging the library books in a shelf in proper order, at the
end of each day. The ideal choice will be
Bubble sort
Insertion sort
Selection sort
Heap sort
Q189. Consider an array on which bubble sort is used. The bubble sort would compare the element A[x] to which of the following elements
in a single iteration. .
A [x+1]
A [x+2]
A [x+2x]
All of these
Q190. The order of magnitude of the worst case performance of a hash coded search (over N elements) is
Op 1: N
Op 2: N log2 N
Op 3: log2 N
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 54/115
8/16/2019 Six Phrase - mySlate
Q191. What is Extended ASCII table
The Extended ASCII Character Set also consists of 128 decimal numbers and
ranges from 128 through 255 (using the full 8-bits of the byte)
The Extended ASCII Character Set also consists of 124 decimal numbers and
ranges from 128 through 255 (using the full 8-bits of the byte)
The Extended ASCII Character Set also consists of 129 decimal numbers and
ranges from 128 through 255 (using the full 8-bits of the byte)
The Extended ASCII Character Set also consists of 128 decimal numbers and
ranges from 126 through 255 (using the full 8-bits of the byte)
Op 1: (n - m + 1)/2
Op 2: 1 + (n - m)/2
Q193. Which of the OSI model layer is responsible for both encryption and decryption
a) Presentation layer
b)Network layer
c) session layer
d) transport layer
Op 1: 22
Op 2: 11
Op 3: 10
Op 4: None of these
A.4
C.12
D.3
Q196. Himanshu wants to write a program to print the larger of the two inputted
number. He writes the following code:
int number1, number 2
input number1, number 2
if (??) // Statement 1
print number1
else
print number2
end if
Fill in the ?? in statement 1.
Op 1: number1>number2
Op 2: number2>number1
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 56/115
8/16/2019 Six Phrase - mySlate
A. 16
B. 4
C. 5
D.12
Op 1: 0 and 1
Op 2: 0 and 0
Op 3: 1 and 1
Op 4: 1 and 0
Q199.
What will be the output of the following algorithm?
Start
Declare v ariable f,g and i
Set f=0 and g=1
For i=1 to 4
Print f
F=f+g
G=f+g
End
a. 0 1 1 2
b. 0 1 1 8
c. 0 1 3 8
d. 0 2 5 8
Q200. Ravi and Rupali are asked to write a program to sum the rows of a 2X2
matrices stored in the array A.
Ravi writes the following code (Code A):
for n = 0 to 1
sumRow1[n] = A[n][1] + A[n][2]
end
Rupali writes the following code (Code B):
sumRow1[0] = A[0][1] + A[0][2]
sumRow1[1] = A[1][1] + A[1][2]
Comment upon these codes (Assume no loop-unrolling done by compiler):
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 57/115
8/16/2019 Six Phrase - mySlate
A. Compilation error
B. inside if
C. inside else
D. inside else if
Q202. Identify the point that is not true with respect to stack
a) not possible to insert or remove elements anywhere except the top of stack
c) None of these
2n + 1 nodes
log2 n nodes
2n - 1 nodes
2n nodes
Q204.
The following pseudocode can be used for :
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 58/115
8/16/2019 Let LB be the lower bound and UB be the upper bound of Six
a linear
Phrase - array
mySlate A.
[Initialize counter ]set k at lower bound LB
Repeat for k=LB to UB
Print a[k]
[End of the loop]
Exit
b.Sorting an array
c.Traversing an array
Q205.
Which of the following is a direct search technique?
a.Binary search
b.Linear search
c. Tree search
d.Hashing
Input n=1234
Integer q,r and qn
Set q=n and qn=0
while (q>0)
r=q mod 10
qn=qn + r^3
q=q/10
End while loop
Print qn
:A.10
B.321
C.36
D.100
Q207. In an implementation of a linked list, each node contains data and address. Which of the following could the address eld possibly
contain? Op 1: Address of next node in sequence Op 2: It's own address Op 3: Address of last node Op 4: Address of rst node
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 59/115
8/16/2019 Six Phrase - mySlate
Q208. Surbhi is given two codes, A and B, to solve a problem, which have complexity
O(n3
) and &omega(n4
) respectively. Her client wants to solve a problem of size k,
which is suf ciently large. Which code will Surbhi deliver to the client, so that the
execution is faster?
Op 1: Code A
Op 2: Code B
Let LB be the lower bound and UB be the upper bound of a linear array a.
[initialize counter]set k at lower bound LB.
repeat for l=LB to UB
Print a[k]
[end of the loop]
exit
B. sorting an array
D. traversing of array
Q210. Vrinda writes an ef cient program to sum two square diagonal matrices
(matrices with elements only on diagonal). The size of each matrix is nXn. What is the
time complexity of Vrinda's algorithm?
Op 1: &theta(n^2)
Op 2: &theta(n)
Op 3: &theta(n*log(n))
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 60/115
8/16/2019 Six Phrase - mySlate
Op 4: None of these
Q211. A queue is implemented by a linear array of size 10 (and not as a circularly connected array).
Front and Rear are represented as an index in the array. To add an element, the rear index is incremented and the element is added.
To delete an element, the front index is incremented.
The following operations are done on an empty queue.
ADD 1; DELETE; ADD 2; ADD 3; ADD 4; DELETE, DELETE
After this set of operations, what is the maximum capacity of the queue?
6
10
Q212. A hash table can store a maximum of 10 records. Currently there are records in locations 1, 3, 4, 7, 8, 9, 10. The probability of a new
record going into location 2, with a hash function resolving collisions by linear probing is
0.6
0.1
0.2
0.5
Q213. #include<stdio.h>
int main()
{
int a =0,b=1,c=2;
*( ( a+1==1) ? &b : &a)= a? b : c;
printf(“%d, %d, %d \n” ,a , b, c );
return 0;
}
2,2,2
0,1,2
0,2,2
2,1,0
Q214. Which of the following data structure may give over ow error, even though
the current number of element in it is less than its size ?
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 61/115
8/16/2019 Six Phrase - mySlate
Op 4: none of these
Q216. Shantanu wants to make a program to print the sum of the rst 7 multiples of
6. He writes the following program:
integer i = 0 // statement 1
integer sum // statement 2
while ( i <= 42 ) // statement 3
{
sum = sum + i // statement 4
i = i + 6;
}
print sum // statement 6
Does this program have an error? If yes, which one statement will you modify to
correct the program?
Op 1: Statement 1
Op 2: Statement 2
Op 3: Statement 3
Op 4: Statement 4
A. Calculate X+X*Y
B. Calculate x?
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 62/115
8/16/2019 Six Phrase - mySlate
D. Calculate yx
Q218. A sorting algorithm iteratively traverses through a list to exchange the rst element with any element less than it. It then repeats with
a new rst element. What is this sorting algorithm called?
Op 1: insertion sort
Op 2: selection sort
Op 3: heap sort
Op 4: quick sort
Q219.
What will be the output of the following code ?
#include<stdio.h>
Void main()
{
Int x=9,y=2,z=6;
Int a= x & y | z;
Printf(“%d”,a);
}
a.2
b.3
c.0
d.6
Q220. Consider the following operation along with Enqueue and Dequeue operations on queues.where k is a global parameter
multiqueue(Q)
{
n=k
while(Q is not empty)and (n>0)
{
Dequeue(Q)
n=n-1
}
}
What is the worst-case time complexity of a sequence of ‘m’ Multi Dequeue () operations on an initially empty queue?
A. theta(m)
B. theta(mk)
C. theta(m^2)
D. theta(m+k)
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 63/115
8/16/2019 Six Phrase - mySlate
Q221. The time complexity of linear search algorithm over an array of n elements is
Op 1: O (log2 n)
Op 2: O (n)
Op 3: O (n log2 n )
Op 4: O (n2)
Op 1: simulation of recursion
Op 4: expression evaluation
A. 0 2 5 8
B. 0 1 1 8
C. 0 1 1 2
D. 0 1 3 8
Q224. Rohit writes the following program which inputs a number and prints "Double
digit" if the number is composed of two digits and "Not a double digit" if it is not.
int number;
if (number>10 AND number < 100)
print "Double digit"
else
print "Not a double digit"
end if
Rohit tries the following inputs: 5 and 66. The program works ne. He asks his
brother Ravi to try the program. When Ravi enters a number, the program doesn't
work correctly. What did Ravi enter?
Op 1: 8
Op 2: 100
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 64/115
8/16/2019 Six Phrase - mySlate
Op 3: 99
Op 4: 10
A. 2,1,8
B. 4,1,8
C. 4,4,8
D. 2,4,8
Q226. The memory space needed by an algorithm has a xed part independent of
the problem instance solved and a variable part which changes according to the
problem instance solved. In general, which of these two is of prime concern to an
algorithm designer?
Op 1: Fixed part
Op 2: Variable Part
Op 4: None of these
Q227. Bhavya wants to make a program to print the sum of all perfect squares,
where the value of the squares go from 0 to 50. She writes the following program:
integer i = 1, a // statement 1
integer sum = 0
while ( a < 50 ) // statement 2
{
sum = sum + a // statement 3
i=i+1
a = ( i * i ); // statement 4
}
print sum
Does this program have an error? If yes, which one statement will you modify to
correct the program?
Op 1: Statement 1
Op 2: Statement 2
Op 3: Statement 3
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 65/115
8/16/2019 Six Phrase - mySlate
Op 4: Statement 4
Q229. Which of the OSI model layer is also known as end-to-end layer
a) session layer
b) presentation layer
c) Transport layer
d) Network layer
Q230. Surbhi wants to implement a particular data structure using a static array. She uses the concept of circular list to implement the
data structure, because this allows her to ef ciently use all elds of the array. Which data structure is Surbhi implementing?
a stack
a queue
Binary Tree
None of these
Q231.
What will be the output of the following pseudocode?
Input n=1234
Integer q,r and rn
Set q-n and rn=3
While(q>0)
R= q mod 10
Rn=rn+r^3
Q=q/10
End while loop
Print rn
b.10
c.100
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 66/115
8/16/2019 Six Phrase - mySlate
d.36
e.321
Op 1: 16
Op 2: 12
Op 3: 13
Op 4: 14
a)associative lists
c)none of these
d)adjacency matrix
B. F₃∠F₂∠F₁∠ F₂
C. F₃∠F₂∠F₄∠F₁
D. F₂∠F₃∠F₁∠F₄
Q235. What is the output of the following code statements? The compiler saves the
rst integer at the memory location 4062. Integer is one byte long.
integer a
pointer b
a = 20
b = &a
print *b
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 67/115
8/16/2019 Six Phrase - mySlate
Op 1: 4062
Op 2: 4063
Op 3: 20
Op 4: 10
Q236.
In which of the following situations queue implementation is usefull?
D. Load balancing
Q237. To solve a problem, it is broken in to a sequence of smaller sub-problems, till a stage that the sub-problem can be easily solved.
What is this design approach called?
Op 1: Top-down Approach
Op 2: Bottom-Up Approach
Op 3: Procedural Programming
Op 4: None of these
Q238. Shalini wants to program to print the largest number out of three inputted
numbers. She writes the following program:
int number1, number 2, number3, temp;
input number1, number2, number3;
if (number1>number2)
temp = number1
else
temp = number2
end if
if (??) // Statement 1
temp = number3
end if
print temp
Fill in the ?? in Statement 1
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 68/115
8/16/2019 Six Phrase - mySlate
Q239. Upon mixing two independent one-many relationships__________dependency arises.
a)transitive
b)multivalued
c)functional
d)partial
Op 1: 410
Op 2: 410.4
Op 3: 411.4
Op 4: 411
20
Op 1:
0
03
Op 2:
03
036
Op 3:
0
036
0369
Op 4:
036
0369
0 3 6 9 12
Q242.
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 69/115
8/16/2019 what will be the output of the following c code? Six Phrase - mySlate
#include<stdio.h>
Int main()
{
Int y=5;
Int z=y+(y=10);
Printf(“%d\n”,z);
}
a.20
b.4
c.either 12 or 20
d.12
Q243.
Consider the following functions and their complexities:
F1(n)=2n
F2(n)=n3/2
F3(n)=n Log n
F4(n)=nLog n
Which among the following options correctly represents the increasing order of asymptotic complexity of the functions F1,F2,F3,F4
Respectively?
B. F2<F3<F1<F4
C. F3<F2<F1<F4
D. F3<F2<F4<F1
Q244. What will be the probability of selecting a 1st node from a given Singly Linked List?
(Assume that there are N nodes in list)
A. 1/N
B. 2(N-1)/N
C. 2N-1
D. N/2(n-1)
Op 1: An interpreter
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 70/115
8/16/2019 Six Phrase - mySlate
Op 2: A compiler
Op 3: A cross-compiler
Op 4: Linker
Q246. A queue is implemented as a (singly linked) linked-list. Each node has an element and pointer to another node. Rear and Front
contain the addresses of the rear and front node respectively. If the condition (rear isequal front) is true and neither is NULL, what do
we infer about the linked list?
It has no elements
There is an error
None of these
Op 1: Differ by 80
Op 2: Same
Op 3: Differ by 50
Op 4: Differ by 160
Q248. Shashi wants to make a program to print the sum of the rst 10 multiples of 5.
She writes the following program, where statement 5 is missing:
integer i = 0
integer sum = 0
while ( i <= 50 )
{
sum = sum + i
-- MISSING STATEMENT 5 --
}
print sum
Which of the following will you use for statement 5?
Op 1: i = 5
Op 2: i = 5 * i
Op 3: i = i + 1
Op 4: i = i + 5
Q249. #include<stdio.h>
void main()
{
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 71/115
8/16/2019 int k = 4; Six Phrase - mySlate
int *const p = &k;
int r = 3;
p = &r;
printf (“%d”, p);
}
A. 2
B. 6
C. 3
D. 0
Q251.
What does the following algorithm do?
1. Start
2. take 2 strings s1 and s2
3. set k=0
4. Repeat while length of string s1
5. increment k
6. set j=0
7. repeat while length of string s2
8. set s1[k] = s2[j]
9. increment J by 1
10. increment K by 1
11. set s1[K] = Null
12. print s1
13. stop
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 72/115
8/16/2019 Six Phrase - mySlate
A. Binary search
B. Linear search
C. Tree search
D. Hashing
Q253.
What will be the output of the following C code?
#include<stdio.h>
Int main()
{
Int x=0;
If(x==1)
If(x==0)
Printf(“inside if \n”);
Else
Printf(“inside else if\n”);
Else
Printf(“inside else\n”);
}
a.inside if
b.inside else
c.compilation error
d.inside else if
Q254. A sort which uses the binary tree concept such that any number in the tree is larger than all the numbers in the subtree below it is
called
Op 1: selection sort
Op 2: insertion sort
Op 3: heap sort
Op 4: quick sort
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 73/115
8/16/2019 Six Phrase - mySlate
web browser
ethernet
application
LAN
Q256. Smriti wants to make a program to print the sum of square of the rst 5 whole
numbers (0...4). She writes the following program:
integer i = 0 // statement 1
integer sum = 0 // statement 2
while ( i < 5 ) // statement 3
{
sum = i*i // statement 4
i = i + 1 // statement 5
17
}
print sum // statement 6
Is her program correct? If not, which statement will you modify to correct it?
Op 2: Statement 1
Op 3: Statement 4
Op 4: statement 6
Q257. Ravi has to add an strictly upper triangular (no elements at diagonal) and a
strictly lower triangular square matrix (no elements at diagonal) and put the result in
a third matrix. What is the time complexity of Ravi's algorithm? Assume that storing
a value in a memory space takes negligible time, while each addition between values
takes the dominating amount of time.
Op 1: &theta(n^2)
Op 2: &theta(n)
Op 3: &theta(1)
Op 4: None of these
Q258. I have a problem to solve which takes as input a number n. The problem has a
property that given the solution for (n-1), I can easily solve the problem for n. Which
programming technique will I use to solve such a problem?
Op 1: Iteration
Op 2: Decision-making
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 74/115
8/16/2019 Six Phrase - mySlate
Op 4: Recursion
Q259. What will be output of the following code if the value of n1 and n2 are 12, 30 respectively?
B. 12 15 18 21
C. 13 15 17 19 21 23 25 27 29
D. 13 17 19 23
Q260. A queue is implemented as a (singly linked) linked-list for easy addition and deletion of elements. Each node has an element and
pointer to another node. Which node will point to empty/no location?
Front
Rear
Both
None of these
Op 1: 12 17
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 75/115
8/16/2019 Six Phrase - mySlate
Op 2: 10 17
Op 3: 12 20
Op 4: 10 20
Q262. A stack is implemented as a (singly-linked) linked-list, where each node contains data and address of another node. The top node
will contain the address of which node?
The node containing the rst element pushed into the stack
The node containing the element which was pushed just before the top
element.
None of these
Q263. A complete binary tree with 5 levels has how many nodes? (Root is Level 1)
15
25
63
31
top< N-1
top<n
top>1
top >= 0
Op 2: It returns the area of a circle within the limits of the constant PI.
A. recursion
Q269. Rajini is given an ef cient code for summing two nXn matrices and putting the
result in a third matrix. She is asked to nd it's time complexity. She realizes that the
number of iterations required is more than n. What can she claim with regard to the
complexity of the code?
Op 1: It is O(n)
Op 2: It is O(n2)
Op 3: It is &theta(n)
Op 4: It is &omega(n)
a.byte code
b.word code
c.bit code
d.objective code
Q271. Zenab and Shashi independently write a program to nd the the mass of one mole of water, which includes mass of hydrogen and
oxygen. Zenab de nes the variables:
integer hydrogen, oxygen, water // Code A while Shashi de nes the three quantities as: integer a, b, c // Code B
Which is a better programming practice and why?
Op 2: Differ by 10
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 78/115
8/16/2019 Six Phrase - mySlate
Op 3: Differ by 20
Op 4: Same
A. 5
B. 4
C. 6
D. 7
C.Load balancing
Q275.
Consider the following operations along with Enqueue and DEqueue operations on queues where k is a global parameter
MultiDequeue(Q)
{
n=k
while (Q is not empty) and (n>0)
{
Dequeue (Q)
n = n-1
}
}
What is the worst-case time complexity of a sequence of ‘m’ MultiDeque()operations on an initially empty queue?
a. θ(m+k)
b. θ(mk)
c. θ(m^2)
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 79/115
8/16/2019 Six Phrase - mySlate
d. θ(m)
A. 1,4,8
B. 2,4,8
C. 4,4,8
D. 2,1,8
Q278. Rajesh implements queue as a singly-linked linked list. The queue has n elements. The time complexity to ADD a new element to the
queue:
Op 1: O (1)
Op 2: O (log2 n)
Op 3: O (n)
Op 4: O (n log2 n )
Circular List
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 80/115
8/16/2019 Six Phrase - mySlate
Q280.
What will be the necessary condition to get the desired element fom a given array by using the following algorithm?
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 81/115
8/16/2019 Six Phrase - mySlate
Q1 b.n-1
Solution
No Solution
Q2 Op 4: bubble sort
Solution
No Solution
Solution
No Solution
Q4 Op 4: Better readability
Solution
No Solution
Q5 10 8 5 7 4
Solution
No Solution
Q6 A.7
Solution
No Solution
Q7 Op 3: Logical Error
Solution
No Solution
Q8 b. 0 1 2 4
Solution
No Solution
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 82/115
8/16/2019 Six Phrase - mySlate
Q9 Op 1: (n+1) / 2
Solution
No Solution
Solution
No Solution
Q11 Op 4: 0 to 1023
Solution
No Solution
Q12 stack
Solution
No Solution
Q13 c.72
Solution
No Solution
Q14 b.nested
Solution
No Solution
Q15 c.4
Solution
No Solution
Q16 b.21
Solution
No Solution
Q17 C.7
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 83/115
8/16/2019 Six Phrase - mySlate
Solution
No Solution
Q18 Op 4: Statement 4
Solution
No Solution
Solution
No Solution
Q20 d.336
Solution
No Solution
Q21 C.256
Solution
No Solution
Q22 Op 2: The rst code has higher time complexity than the second
Solution
No Solution
Q23 b. 13 17 19 23 29
Solution
No Solution
Solution
No Solution
Solution
No Solution
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 84/115
8/16/2019 Six Phrase - mySlate
Q26 10(R) 13(F)
Solution
No Solution
Q27 Op 2: Statement 2
Solution
No Solution
Q28 Graph
Solution
No Solution
Q29 Op 2: 7 bits
Solution
No Solution
Q30 Op 2: 1 + 3 + 5 + 7 + ... + n
Solution
No Solution
Solution
No Solution
Q32 Op 3: Comments
Solution
No Solution
Q33 D. n-1
Solution
No Solution
Q34 Op 1: n equals 1
Solution
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 85/115
8/16/2019 Six Phrase - mySlate
No Solution
Solution
No Solution
Solution
No Solution
Q37 a.28
Solution
No Solution
Q38 b.4
Solution
No Solution
Solution
No Solution
Q40 b. 3 4 1 2
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q43 Op 3: 8 bits
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 86/115
8/16/2019 Six Phrase - mySlate
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q46 B.32
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q50 D. 4
Solution
No Solution
Q51 Op 2: 35
Solution
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 87/115
8/16/2019 Six Phrase - mySlate
No Solution
Q52 Op 3: 32
Solution
No Solution
Q53 Op 2: &theta(n)
Solution
No Solution
Solution
No Solution
Q55 Op 3: 255
Solution
No Solution
Q56 Op 4: 2 + 4 + 6 + 8 + ... + n
Solution
No Solution
Q57 Op 2: 10
Solution
No Solution
Q58 Op 2: Decision-making
Solution
No Solution
Q59 Op 1: 65
Solution
No Solution
Q60 Op 4: 1000
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 88/115
8/16/2019 Six Phrase - mySlate
Solution
No Solution
Q61 C. 72
Solution
No Solution
Solution
No Solution
Q63 Op 3: 15
Solution
No Solution
Q64 d.1/n
Solution
No Solution
Solution
No Solution
Q66 Op 3: 4 and 5
Solution
No Solution
Q67 Op 1: (n - m + 1)/2
Solution
No Solution
Q68 Op 2: 40
Solution
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 89/115
8/16/2019 Six Phrase - mySlate
No Solution
Q69 d. N+1
Solution
No Solution
Q70 Op 1: 48
Solution
No Solution
Q71 c. 0,2,2
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q75 a) red x
Solution
No Solution
Q76 Op 2: a - b + 1
Solution
No Solution
Solution
No Solution
Q78 a.Successful
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q81 Op 1: O (1)
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q84 Op 1: 25
Solution
No Solution
Q85 A. 1
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 91/115
8/16/2019 Six Phrase - mySlate
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q89 (n+1)/2
Solution
No Solution
Q90 d.3
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 92/115
8/16/2019 Six Phrase - mySlate
Q94 D. 5
Solution
No Solution
Q95 B.85
Solution
No Solution
Q96 A. Successful
Solution
No Solution
Q97 d.55
Solution
No Solution
Solution
No Solution
Q99 Op 1: 50
Solution
No Solution
Solution
No Solution
Q101 Op 3: &theta(log3(n))
Solution
No Solution
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 93/115
8/16/2019 Six Phrase - mySlate
Q102 Op 1: 30
Solution
No Solution
Q103 D. 3
Solution
No Solution
Q104 Queue
Solution
No Solution
Q105 Op 3: 2*i
Solution
No Solution
Q106 b) in order
Solution
No Solution
Solution
No Solution
Q108 C. 3
Solution
No Solution
Q109 C. 0 1 2 3
Solution
No Solution
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 94/115
8/16/2019 Six Phrase - mySlate
Q110 B. 3
Solution
No Solution
Solution
No Solution
Q112 Op 2: 00101111
Solution
No Solution
Q113 Op 1: Code A
Solution
No Solution
Solution
No Solution
Q115 Op 4: array
Solution
No Solution
Q116 c.1,4,8,
Solution
No Solution
Q117 a. hello4
Solution
No Solution
Q118
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 95/115
8/16/2019 Six Phrase - mySlate
Op 4: 5 -5
Solution
No Solution
Q119 Op 2: boolean
Solution
No Solution
Q120 Op 1: O(1)
Solution
No Solution
Q121 Op 2: 13 -8
Solution
No Solution
Solution
No Solution
Q123 b.3
Solution
No Solution
Solution
No Solution
Q125 Op 1: a = 10 b = 200
Solution
No Solution
Q126 c.3
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 96/115
8/16/2019 Six Phrase - mySlate
Solution
No Solution
Q127 Op 2: Recursion
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q131 A. 6
Solution
No Solution
Solution
No Solution
Q133 Op 2: 55
Solution
No Solution
Q134
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 97/115
8/16/2019 Six Phrase - mySlate
2l-1
Solution
No Solution
Q135 2
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q138 Op 3: recursion
Solution
No Solution
Q139 B.72
Solution
No Solution
Solution
No Solution
Solution
No Solution
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 98/115
8/16/2019 Six Phrase - mySlate
Solution
No Solution
Q143 Op 1: 52
Solution
No Solution
Q144 DATA1234
Solution
No Solution
Q145 12
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q149 40
Solution
No Solution
Solution
No Solution
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 99/115
8/16/2019 Six Phrase - mySlate
Q151 Op 4: Simulator
Solution
No Solution
Q152 b.0
Solution
No Solution
Solution
No Solution
Q154 Op 1: 1
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q157 a.x=3;y=4;z=2
Solution
No Solution
Solution
No Solution
Q159 Op 3: 478
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 100/115
8/16/2019 Six Phrase - mySlate
Solution
No Solution
Q160 A. 4
Solution
No Solution
Q161 15
Solution
No Solution
Solution
No Solution
Q163 Op 4: A program needs to be compiled once but can be run several times.
Solution
No Solution
Solution
No Solution
Q165 Op 2: 5
Solution
No Solution
Solution
No Solution
Q167 c.101110000
Solution
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 101/115
8/16/2019 Six Phrase - mySlate
No Solution
Solution
No Solution
Solution
No Solution
Q170 Op 3: 40
Solution
No Solution
Q171 Op 4: 3
Solution
No Solution
Solution
No Solution
Q173 d.4
Solution
No Solution
Q174 Op 1: Code A
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q179 Op 1: Decision-Making
Solution
No Solution
Q180 d.6
Solution
No Solution
Q181 Op 1: Decision-Making
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q184 Op 2: Iteration
Solution
No Solution
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 103/115
8/16/2019 Six Phrase - mySlate
Q185 a)presentation layer
Solution
No Solution
Solution
No Solution
Q187 Op 1: 7
Solution
No Solution
Solution
No Solution
Q189 A [x+1]
Solution
No Solution
Q190 Op 1: N
Solution
No Solution
Q191 The Extended ASCII Character Set also consists of 128 decimal numbers and ranges from 128 through 255 (using the full 8-bits of the
byte)
Solution
No Solution
Q192 Op 2: 1 + (n - m)/2
Solution
No Solution
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 104/115
8/16/2019 Six Phrase - mySlate
Solution
No Solution
Q194 Op 2: 11
Solution
No Solution
Q195 C.12
Solution
No Solution
Q196 Op 1: number1>number2
Solution
No Solution
Q197 B. 4
Solution
No Solution
Q198 Op 4: 1 and 0
Solution
No Solution
Q199 c. 0 1 3 8
Solution
No Solution
Solution
No Solution
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 105/115
8/16/2019 Six Phrase - mySlate
Solution
No Solution
Solution
No Solution
Q203 2n - 1 nodes
Solution
No Solution
Solution
No Solution
Q205 d.Hashing
Solution
No Solution
Q206 :A.10
Solution
No Solution
Solution
No Solution
Q208 Op 1: Code A
Solution
No Solution
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 106/115
8/16/2019 Six Phrase - mySlate
Solution
No Solution
Q210 Op 2: &theta(n)
Solution
No Solution
Q211 7
Solution
No Solution
Q212 0.6
Solution
No Solution
Q213 0,2,2
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q216 Op 2: Statement 2
Solution
No Solution
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 107/115
8/16/2019 Six Phrase - mySlate
Solution
No Solution
Solution
No Solution
Q219 d.6
Solution
No Solution
Q220 A. theta(m)
Solution
No Solution
Q221 Op 2: O (n)
Solution
No Solution
Solution
No Solution
Q223 C. 0 1 1 2
Solution
No Solution
Q224 Op 4: 10
Solution
No Solution
Q225 A. 2,1,8
Solution
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 108/115
8/16/2019 Six Phrase - mySlate
No Solution
Solution
No Solution
Q227 Op 1: Statement 1
Solution
No Solution
Q228 Op 1: Converts code from a high level language to a low level language
Solution
No Solution
Solution
No Solution
Q230 a queue
Solution
No Solution
Q231 c.100
Solution
No Solution
Q232 Op 2: 12
Solution
No Solution
Solution
No Solution
Q234 C. F₃∠F₂∠F₄∠F₁
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 109/115
8/16/2019 Six Phrase - mySlate
Solution
No Solution
Q235 Op 3: 20
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q239 b)multivalued
Solution
No Solution
Q240 Op 4: 411
Solution
No Solution
Q241 Op 3:
036
0369
Solution
No Solution
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 110/115
8/16/2019 Six Phrase - mySlate
Q242 a.20
Solution
No Solution
Q243 D. F3<F2<F4<F1
Solution
No Solution
Q244 A. 1/N
Solution
No Solution
Q245 Op 3: A cross-compiler
Solution
No Solution
Solution
No Solution
Q247 Op 1: Differ by 80
Solution
No Solution
Q248 Op 4: i = i + 5
Solution
No Solution
Solution
No Solution
Q250 B. 6
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 111/115
8/16/2019 Six Phrase - mySlate
Solution
No Solution
Solution
No Solution
Q252 D. Hashing
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q256 Op 3: Statement 4
Solution
No Solution
Q257 Op 3: &theta(1)
Solution
No Solution
Q258 Op 4: Recursion
Solution
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 112/115
8/16/2019 Six Phrase - mySlate
No Solution
Solution
No Solution
Q260 Rear
Solution
No Solution
Q261 Op 2: 10 17
Solution
No Solution
Q262 The node containing the element which was pushed just before the top element.
Solution
No Solution
Q263 31
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 113/115
8/16/2019 Six Phrase - mySlate
Q267 C. both (A) & (B)
Solution
No Solution
Solution
No Solution
Q269 Op 4: It is &omega(n)
Solution
No Solution
Solution
No Solution
Q271 Op 2: Code A is better because the variable names are understandable and nonconfusing
Solution
No Solution
Q272 Op 4: Same
Solution
No Solution
Q273 C. 6
Solution
No Solution
Solution
No Solution
Q275 d. θ(m)
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 114/115
8/16/2019 Six Phrase - mySlate
Solution
No Solution
Q276 A. 1,4,8
Solution
No Solution
Q277 3
Solution
No Solution
Q278 Op 1: O (1)
Solution
No Solution
Solution
No Solution
Solution
No Solution
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 115/115