100% found this document useful (1 vote)
1K views115 pages

Six Phrase - Myslate - Computer Fundamentals PDF

The document describes a computer fundamentals test with 1 section and 280 questions over 300 minutes. The section contains 280 multiple choice questions to be completed within 300 minutes. No additional instructions are provided. Sample questions and answer options are included to demonstrate question format.

Uploaded by

vinay mocharla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
1K views115 pages

Six Phrase - Myslate - Computer Fundamentals PDF

The document describes a computer fundamentals test with 1 section and 280 questions over 300 minutes. The section contains 280 multiple choice questions to be completed within 300 minutes. No additional instructions are provided. Sample questions and answer options are included to demonstrate question format.

Uploaded by

vinay mocharla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 115

8/16/2019 Six Phrase - mySlate

Cocubes Computer Fundamentals


Test Summary
No. of Sections: 1
No. of Questions: 280
Total Duration: 300 min

Section 1 - Computer Fundamentals

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 1: Compile the whole code and step into it line by line

Op 2: Use an interpreter on the rst 25 lines.

Op 3: Compile the whole code and run it

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 2: Lower memory requirement 

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

Q6. What will be the output of the following pseudocode?


 
         Integer result and set num1=5,num2=7,num3=6
         if(num1 > num2)
         if(num1 > num3)
                      Result = num1
        else
                       result=num3
      else
                       result= num2
      else
                         result=num3
      Print result

A.7
      

B.5
    

  C.Error in the logic


    

  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?

Declare variable x, y and i


Set x=0 and y=1
For(int i=1;i<=4; i=i+1)
Print x
X=x+y
Y=x/y
End of the loop

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

Q10.  Suppose f(A,B)=A'+B. Simpli ed expression for function f(f(x+y,y),z) is :

A. x'+z  

B. xyz  

 C. xy'+z

 D. None of the mention options

Q11. A 10-bit unsigned integer has the following range:

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

Q12. Which of the following is useful in implementing quick sort? 

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

d.None of the mentioned

e.65

Q14. A class de ned within another class is named as

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

Q18. Consider the following function:


function run( )
{
integer a = 0 // Statement 1
while (a < 5)
{
integer c = 0 // Statement 2
c = c + 1 // Statement 3
a=a+1
}
print c // Statement 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 5/115
8/16/2019 Six Phrase - mySlate
40

}
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?

lastB -> next = rstA  

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

Q21. What will be the output of the following pseudocode?


Input a=6,b=9
Integer n
Set res=1
if(a>10&&b<a)
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 6/115
8/16/2019 Print Error Message Six Phrase - mySlate
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 inside if()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

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 1: Both codes have same complexity

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.

Op 4: Both codes are the same.

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

a.will print all the values from 12 to 30

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?

a.   A parntheseis is balancing program

b.   Syntax analyser for a compiler

c.   Keeping track of local varaiables at run time

d.   All the mentioned options

Q25. The time complexity of code A is &theta(n), while for Code B it is


&theta(log(n)). Which of the following is true for suf ciently large n?

Op 1: Both code have the same time complexity

Op 2: Code A has higher time complexity

Op 3: Code B has higher time complexity

Op 4: No comparison can be made between the time complexity of the two


codes.

Q26. Q is an empty queue. The following operations are done on it: 


ADD 5 
ADD 7 
ADD 46 
DELETE 
ADD 13 
DELETE
DELETE 
ADD 10
What will be the content of Q after these operations. Front is marked by (F) and Rear is marked by (R). Op 1: 10(R) 13(F) Op 2: 5(R)
10(F) Op 3: 13(R) 10(F) Op 4: 10(R) 5(F)  

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)

Q31. The output quality of a printer is measured by:


https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 9/115
8/16/2019 Six Phrase - mySlate

a.Dots printed per unit time

b.Dot per centimeter

c.Dot per sq.inch

d.Dot per inch

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 3: Divide and conquer 

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);
}

a.it will print address of r

b.it will print address of k+ address of r

c. it will print address of k

d.compile time error

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

Q39. What will be the output of the follwing loop? 


#include<stdio.h> 
main() 

while(printf(“%d”,  printf(“az”)))
 printf(“by”); 

 a.none of these  

b.it gives syntax error   

 c.it will print az2byaz2byaz2byaz2by…   

d.it will print azbybyby… 

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 3: Vibhu cannot determine

Op 4: Both codes have the same execution time, so deliver any.

Q42. A robust program has which one of the following features? 

Op 1: It runs correctly on some inputs

Op 2: It is robust to hardware damage

Op 3: It can handle incorrect input data or data types. 

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 _________

a. To insert a blank line into a document

b. To begin a new paragraph

c. When the insertion point reaches the right margin

d. in response to certain word commands

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

           

A. The array should contain more than one element


                 

  B. The elements in an array should be in the sorted form


                   

C. No pre-condition is required for the algorithm to work


              

     D.The elements in an array should be in the unsorted form

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

Q47. Consider the following code:


if (condition 1) {
if (condition 2)
{ // Statement A }
else
if (condition 3)
{ // Statement B}
else
{// Statement C }
else
if (condition 4)
{// Statement D}
else
{// Statement E}
}
Which of the following condition will allow execution of statement A?

Op 1: NOT(condition2) AND NOT(condition3)

Op 2: condition1 AND condition4 AND NOT(condition2) AND NOT(condition3)

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

Op 3: condition1 AND condition2 AND condition4

Op 4: NOT(condition1) AND condition2 AND NOT(condition4)

Q48. What is space complexity of a program?

Op 1: Amount of hard-disk space required to store the program

Op 2: Amount of hard-disk space required to compile the program

Op 3: Amount of memory required by the program to run

Op 4: Amount of memory required for the program to compile

Q49.  A stack is implemented as a linear array A[0…N-1].


Farhan writes the following functions for pushing an element E in to the stack. 
function PUSH( top, E, N )
 { if(X)
 {
 top= top+1
 A[top] = E
 }
 else
 {
 print "Over ow"
 } return
top 
} Fill in the condition X  

top< N 

top <n-1

top > 0

top > 1

Q50. . 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)
          { 
             break;
       }
}
    printf(“%d “ , a);
    return 0;
}

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? 

It may be either linear or circular  

It must contain a header 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 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

Q55. What will be the output of the following code statements?


integer a = 50, b = 25, c = 5
print a * b / c + c

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 

Q59. What will be the output of the following code statements?


integer a = 10, b = 35, c = 5
print a * b / c - c

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?

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. 65
                   

 B. None of the mentioned options


                   

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

Q62. What is implied by the argument of a function? 

Op 1: The variables passed to it when it is called

Op 2: The value it returns on execution 

Op 3: The execution code inside it

Op 4: Its return type 

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?

a.only the front will change

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

b.none of them will change

c.only the rear will change

d.both will change

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

Q67. Consider the following code:


for i= m to n increment 2
{ print "Hello!" }
Assuming m < n and exactly one of (m,n) is even, how many times will Hello be
printed?

Op 1: (n - m + 1)/2

Op 2: 1 + (n - m)/2

Op 3: 1 + (n - m)/2 if m is even, (n - m + 1)/2 if m is odd

Op 4: (n - m + 1)/2 if m is even, 1 + (n - m)/2 if m is odd

Q68. Consider the following code:


function modify(a,b)
{
integer c, d = 2
c = a*d + b
return c
}
function calculate( )
{
integer a = 5, b = 20, c
integer d = 10
c = modify(a, b);
c=c+d
print c
}
Assume that a and b were passed by value. What will be the output of the function
calculate( ) ?

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

b. The number depends on the shape of the tree.

c. N

d. N+1

Q70. What will be the output of the following pseudo-code statements:


integer a = 984, b, c, d =10
print remainder(a,d) // remainder when a is divided by d
a = a/d
print remainder(a,d) // remainder when a is divided by d

Op 1: 48

Op 2: Error

Op 3: 84

Op 4: 44

Q71. what will be the output of the following c code?


#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;
}

a. 0,1,2

b. 2,2,2

c. 0,2,2

d. 1,1,2

Q72. A variable cannot be used…

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

Op 3: In the function it is declared in 

Op 4: Can always be used

Q73. To select a group of words,________.

a.right-click the rst and last characters of the group to be selected

b.double-click anywhere within the group to be selected

c.click the group button on the formatting toolbar

d.drag the mouse pointer through the characters to be selected

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

b) red check mark

c) green check mark

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

Q77. What does the following algorithm do?


         
         Start
         Take 2 strings s1 and s2
         Set K=0
         Repeat while length of string s1
         Set J = 0
         Repeat while length of string s2
         Set s1[K]= s2[J]
         Increment j by 1
         Increment k by 1
        Set s1[K]=Null
        Print s1
        Stop

A. Reverse and concatenate two strings


       

 B. Concatenate two strings


      

  C. Reverse and copy both the strings


      

   D. None of the mentioned options

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

c.It will not print anything

d. Unde ned behaviour of the algorithm

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

a.both of P and Q.

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

Q85. What will 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
       

 B.  0
        

C.  Unde ned behavior due to order of evaluation can be different.


        

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

Op 3: Gautam cannot determine

Op 4: Both codes have the same execution time, so deliver any.

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.

c.All the mentioned options are correct

d.Stack supports LIFO order of deletion of items

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+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

Q91. What does the following function do?


function operation (int a, int b)
{
if (a > b)
{ return operation(b, a) }
else
{ return a; }
}

Op 1: Always returns the rst parameter

Op 2: Returns the min of (a,b)

Op 3: Returns the max of (a,b)

Op 4: Loops forever

Q92. The average search time of hashing with linear probing will be less if the load factor

Op 1: is far less than one 

Op 2: equals one

Op 3: is far greater than 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 1: Writing the program in the programming language

Op 2: Writing a step-by-step algorithm to solve the problem.

Op 3: Compiling the libraries required. 

Op 4: Code debugging

Q94. What will be the output of the following pseudocode?


       
         Input m=9, n= 6
         m= m + 1
          n= n - 1
         m= m + n         
         if(m>n)
              print m
         else
              Print 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 27/115
8/16/2019   Six Phrase - mySlate

A. 6
      

  B. 10
       

 C. 15
        

D. 5

Q95.  What will be the output of the following algorithm for num 10?


        
Start
Declare variable i,j and num
Enter value for num
Repeat for i=1 to num
Declare static variable sap and set sap=0
sap=sap + i
j=sap
End loop
Print j

A.65
      

B.85
      

C.75
    

  D.55

Q96. What will be the output of the following pseudocode?

           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
                      

C. It will not print anything


                   

   D. Unde ned behaviour of the 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 28/115
8/16/2019 Six Phrase - mySlate
Q97.
What will be the output of the following algorithm for number =10?
Start
Declare the variable I,j,and num
Enter the value of num
Repeat for i=1 to num
Declare the static variable sap and set sap=0
sap=sap+i
j=sap
end loop
print j

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
      

C. Stack supports LIFO (Last In First Out) order of deletion of elements


      

D. All the mentioned options are correct

Q99. Consider the following function


function calculate( n )
{
if(n equals 5)
return 5
else
return (n + calculate(n-5))
end
}
Shishir calls the function by the statement, calculate(20). What value will the
function return?

Op 1: 50

Op 2: 200

Op 3: 35

Op 4: 20

Q100. Which of the following statements is/are TRUE for undirected graphs?

P: Number of odd degree vertices is even.


Q: Sum of degrees of all vertices is even.
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 29/115
8/16/2019 Six Phrase - mySlate

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

Q103. . What will be the output of the following C code?


 
     #include <stdio.h>
     int main()
     {
     int x = 2, y = 0, z = 3;
      x≻ y ? printf(“xd “ , z) : return z;
      }

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

C. Compile time error

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

Q105. Vijay wants to print the following pattern on the screen:


2
24
246
2468
He writes the following program:
integer i = 1, j=2 // statement 1
while ( i <= 4 ) // statement 2
{
j = 2;
while ( j <= ? ) // Statement 3
{
print j
print blank space
j=j+2
}
print end-of-line \takes the cursor to the next line
i=i+1
}
What is the value of ? in statement 3 ::

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

d) this is invalid order

Q107.  Secret key encryption is also know as ---------- 


https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 31/115
8/16/2019 Six Phrase - mySlate

Private Key Encryption

Public Key Encryption

Symmetric Key Encryption.  

both 1 and 3

Q108. Maximum height of an AVL tree with 7 nodes is:

 A. 6
        

B. 4
        

C. 3
        

D. 5

Q109. What will be the output of the following pseudocode?


      
        Declare variable x, y and i
        Set x = 0 and y = 1
        for ( int i=1; i< =4; i=i+1)
             Print x
            x = x + y
            Y = x / y
       End of the loop
    

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 3: Hash Coded Search 

Op 4: None of these

Q112. How will 47 be stored as an unsigned 8-bit binary number? 

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 3: Code A and Code B will run with the same speed

Op 4: None of these

Q114. What will be the output of the following statements?

Declare the integer variables x, y and z


 if x > y
if z > y
Display “One”.
else
if z is equal to x
Display “Two”.
else
Display “Three”.
else
Display “ Four”

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

A. It will display two if z <= y.


       

 B. It will display two if x > y > z.


        

C. It will display four if x <= y.


        

D. It will display four if x > y < z.

Q115. Which of these is not a data type?

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

Q118. Consider the following code:


function modify(y,z)
{
y = y + 1;
z = z + 1;
return y - z
}
function calculate( )
{
integer a = 5, b = 10, c
c = modify(a, b);
print a
print space
print c
}
Assume that a and b were passed by value. What will be the output on executing
function calculate( )?

Op 1: 11 -5

Op 2: 10 -5

Op 3: 6 -5

Op 4: 5 -5

Q119. Stuti is making a questionnaire of True-false questions. She wants to de ne a


data-type which stores the response of the candidate for the question. What is the
most-suited data type for this purpose?

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
      

B:the number depends on the shape of the tree.


      

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

d.None of the mentioned options

Q124.  A connected graph is the one which

Op 1: Cannot be partitioned without removing an edge 

Op 2: Can be partitioned without removing an edge 

Op 3: does not contain a cycle

Op 4: Has even number of vertices 

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 1: This is bad programming practice and should not be done.

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?

Op 1: Statement 1 is changed to:


while (n <=6 AND isdivisible=0)

Op 2: Statement 1 is changed to:


while (n <=6 OR isdivisible=0)

Op 3: Statement 1 is changed to:


while (isdivisible=0)

Op 4: Statement 2 is changed to:


n=n+2

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?

A.  only the rear will change


         

B.  Both will change


         

C.  only the front will change


         

D.  none of them will change

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?

Op 1: Code A uses lesser memory and is slower than Code B

Op 2: Code A uses lesser memory and is faster than Code 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 38/115
8/16/2019 Six Phrase - mySlate

Op 3: Code A uses more memory and is faster than Code B

Op 4: Code A uses more memory and is slower than Code B

Q131. What will be the output of the following pseudocode?


           
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. 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 1: Queue implemented in a linear array

Op 2: Queue implemented in a circularly connected array

Op 3: Stack implemented in a linear array

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?  

Q136. which one is the application of stack?

A. A parenthesis balancing program.


        

B. syntax analyzer for compiler


        

C. keeping track of local variables at run time


        

D. All the mentioned options

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 ?  

Queue implemented in a linear array 

Queue implemented in a circularly connected array

Stack implemented in a linear array

None of these

Q138. Stack is useful for implementing 

Op 1: radix search

Op 2: breadth rst 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
            

   D.None of the mentioned options


   

 E.56

Q140. There are two loops which are nested. This implies which one of the following?

Op 1: Two loop, one after the other 

Op 2: Two loops, one inside the others

Op 3: One loop with two different iteration counts 

Op 4: Two loops with the same iteration count 

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 1: commission = (numberProducts - 200) * 10

Op 2: commission = 200 * 5 + (numberProducts - 200) * 10

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:

a.16 half-adders,0 full-adders

b.8 half –adders,8 full-adders

c.4 half-adders,12 full-adders

d.1 half-adder,15 full-adders

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

Q144. The following fragment of c program will print?


 char c[ ] = “DATA1234” 
char * P = C; 
printf (“%S” P+P[3]-P[1]); 

DATA1234  

b.234    

c.1234  

d.A1234  

Q145.  Number of possible ordered trees with 3 nodes A, B, C is 

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 1: it may be either linear or circular

Op 2: it must contain a header node

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

Q148. Linked lists are not suitable for

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)? 

Bubble sort and Selection 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 43/115
8/16/2019 Six Phrase - mySlate

Heap sort and Merge sort

Quick sort and Radix sort

Tree sort and Median-of-3 Quick sort 

Q151. Gautam writes a program to run on a Motorola processor on his Pentium


computer. He wants to see how the program will execute on the Motorola processor
using his Pentium machine. What tool will he use?

Op 1: Compiler

Op 2: Interpreter

Op 3: Assembler

Op 4: Simulator

Q152. 29. In C programming array index starts from:

a.0 or 1

b.0

c.1

d.none of these

Q153. Consider the following code:


if (condition 1) {
if (condition 2)
{ // Statement A }
else
if (condition 3)
{ // Statement B}
else
{// Statement C }
else
if (condition 4)
{// Statement D}
else
{// Statement E}
}
Which of the following conditions will allow execution of statement E?

Op 1: condition1 AND condition3

Op 2: NOT(condition1) AND condition2 AND NOT(condition4)

Op 3: NOT(condition2) AND NOT(condition3)

Op 4: condition1 AND condition4 AND NOT(condition2) AND NOT(condition3)

Q154. What will be the output of the following code statements?


https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 44/115
8/16/2019 integer a = 50, b = 25, c = 0 Six Phrase - mySlate
print ( a > 45 OR b > 50 AND c > 10 )

Op 1: 1

Op 2: 0

Op 3: -1

Op 4: 10

Q155. Which of the following applications may use a stack?


    

A. All the mentioned options


         

B. Syntax analyzer for a compiler.


         

C. A parenthesis balancing program.


         

D. Keeping track of local variables at run time.

Q156. HUB is a _______ device and switch is a ________ device.  

 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 1: Use for loops

Op 2: Use functions

Op 3: Use arrays

Op 4: Use classes

Q159. A character in new programming language is stored in 2 bytes. A string is


represented as an array of characters. A word is stored as a string. Each byte in the
memory has an address. The word "Mahatma Gandhi" is stored in the memory with
starting address 456. The letter 'd' will be at which memory address?

Op 1: 468

Op 2: 480

Op 3: 478

Op 4: 467

Q160. 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
           Print5 hello
           Get out of the loop
  End if
 End for
  Print a

A. 4
       

 B. 1
        

C. hello
       

 D. hello4

Q161. A is an empty stack. The following operations are done on it.


PUSH(1) 
PUSH(2) 
POP PUSH(5) 
PUSH(6) 
POP
What will the stack contain after these operations. (Top of the stack is underlined) 

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

Q163. While calculating time complexity of an algorithm, the designer concerns


himself/herself primarily with the run time and not the compile time. Why?

Op 1: Run time is always more than compile time.

Op 2: Compile time is always more than run time.

Op 3: Compile time is a function of run time.

Op 4: A program needs to be compiled once but can be run several times.

Q164. What does this function compute for positive n?


function f(int n)
{
if (n equals 1) {
return 1
}
else {
return f(n-1)/f(n-1) + n
}
}

Op 1: 1 + n 

Op 2: 1 + 2 + 3 + ... + n 

Op 3: 1 + n, if n > 1, 1 otherwise 

Op 4: None of the above 

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 1: The code will not compile.

Op 2: The code will give an error while in execution

Op 3: The code may work for some inputs and not for others.

Op 4: It will create no problems.

Q167. What is the binary equivalent of the number 368?  

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”

a.it will display two if z is <=y

b.it will display 2 if x>y>z

c.it will display 4 if x>y<z

d.it will display 4 if x<=y

Q169. In a sequential programming language, code statements are executed in which order?

Op 1: All are executed simultaneously 

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 2: From top to bottom

Op 3: From bottom to top 

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

Q172. What does the following function do?


function operation (int a, int b)
{
if (a < b)
{ return operation(b, a) }
else
{ return a }
}

Op 1: Returns the max of (a,b)

Op 2: Returns the min of (a,b)

Op 3: Loops forever

Op 4: Always returns the second parameter

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 3: Both codes have the same execution time, so deliver any.

Op 4: None of these

Q175. Number of vertices of odd degree in a graph is

Op 1: is always even

Op 2: always odd

Op 3: either even or 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

Q177. Reshama is debugging a piece of code which takes several iterations of


modifying and executing code, while Mohammad has to deliver a product to the
customer, which the customer will run multiple times. Reshama wants her debug
cycle to take minimum possible time, while Mohammad wants that his products run
time is minimum. What tools should Reshama and Mohammad respectively use on
their code?

Op 1: Compiler, Interpreter

Op 2: Interpreter, Compiler

Op 3: Compiler, Compiler

Op 4: Interpreter, Interpreter

Q178. function g(int n)


{
if (n > 0) return 1;
else return -1;
}
function f(int a, int b)
{
if (a > b) return g(b-a);
if (a < b) return g(-a+b);
return 0;
}
If f(a,b) is called, what is returned?

Op 1: Always +1

Op 2: -1 if a > b, 1 if a < b, 0 otherwise

Op 3: 1 if a > b, -1 if a < b, 0 otherwise

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

Op 4: Object Oriented Programming 

Q180. 34.what will be the output of following C code?


1. struct abc
2. {
3. int b=6;
4. char c;
5. }
6. structure;
7. int main()
8. {
9. int i=sizeof(structure);
10. printf(“%d”,i);
11. }

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

Op 4: Object Oriented Programming 

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

b. unde ned behavior due to order of evaluation can be different

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.

b.Queue supports FIFO(First In First Out)order of removal of elements.

c.none of these

d.Insertion in queue happens only at the head of the queue.

Q184. A for-loop is used for which of the following purposes? 

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)

Q187. Consider the following code:


function modify(b,a)
https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 53/115
8/16/2019 { Six Phrase - mySlate
return a - b
}
function calculate( )
{
integer a = 5, b = 12, c
c = modify(a, b);
print c
}
Assume that a and b were passed by reference. What will be the output of the
program on executing function calculate( ) ?

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

Op 4: not dependent upon 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)  

Q192. Consider the following code:


for i= m to n increment 2
{ print "Hello!" }
Assuming m < n and (m,n) are either both even or both odd, How many times will
Hello be printed?

Op 1: (n - m + 1)/2

Op 2: 1 + (n - m)/2

Op 3: 1 + (n - m)/2 if m is even, (n - m + 1)/2 if m is odd

Op 4: (n - m + 1)/2 if m is even, 1 + (n - m)/2 if m is odd

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

Q194. An integer X is saved as an unsigned 8-bit number, 00001011.What is X?

Op 1: 22

Op 2: 11

Op 3: 10

Op 4: None of these 

Q195. What will be the output of the following algorithm


 for the input x = 22 and y=3?
    Start
     Declare x,y,m,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 55/115
8/16/2019      Set m=x and n=y Six Phrase - mySlate
      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.4
     

 B.None of the mentioned options


      

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

Op 3: number2 equals number1

Op 4: number1 <= number2

Q197. #include <stdio.h>


union Sti 
{
  
int nu;
  
char m;
 
};

int main () 


{
  
union Sti m;
  
printf ("%d", sizeof (m));
  
return 0;

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

Q198. integer a = 60, b = 35, c = -30


What will be the output of the following two statements:
print ( a > 45 OR b > 50 AND c > 10 )
print ( ( a > 45 OR b > 50 ) AND c > 10 )

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):

Op 1: Code A will execute faster than Code 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 57/115
8/16/2019 Six Phrase - mySlate

Op 2: Code B will execute faster than Code A

Op 3: Code A is logically incorrect.

Op 4: Code B is logically incorrect.

Q201. What will be the output for this program?


#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. 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

b) Stack supports LIFO(last in rst out) for deleting elements

c) None of these

d) stack is dynamic set where elements are removed in reverse order of


insertion

Q203. A full binary tree with n leaves contains   

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

a.Deleting an element from an array

b.Sorting an array

c.Traversing an array

d. Inserting elements in the array

Q205.
Which of the following is a direct search technique?

a.Binary search

b.Linear search

c. Tree search

d.Hashing

Q206.  What will be the output of the following pseudocode?

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
      

 E.None of the mentioned options

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

Address of next node in sequence 

It's own address  

Address of last node 

Address of rst node 

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

Op 3: Surbhi cannot determine

Op 4: Both codes have the same execution time, so deliver any.

Q209. The following pseudocode can be used for:

          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

A. insertion element in an array


     

  B. sorting an array
     

  C. Deleting an element from 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?   

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 ?

Op 1: Queue implemented in a linear array

Op 2: Queue implemented in a circularly connected array

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 3: Stack implemented in a linear array

Op 4: none of these

Q215. Which of the following is true about comments?

Op 1: They are executed only once.

Op 2: They are not executed

Op 3: A good program does not contain them 

Op 4: They increase program execution time. 

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

Q217. What is the run() do in general?


      
      Int fun(int x, int y)
       {
             If (y==o) return 0:
             return ( x + fun(x, y-1));
       }
        Int run(int a, int b)
       }
        If (b == 0) return 1;
       return fun(aq, b-100;
       ]
 

A. Calculate X+X*Y
        

 B. Calculate x?
        

 C. Calculate x*y


       

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)

Q222. Queues serve a major role in

Op 1: simulation of recursion

Op 2: simulation of arbitrary linked list

Op 3: simulation of limited resource allocation 

Op 4: expression evaluation

Q223. What will be the output of the given algorithm?


    Start
Declare Variable 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 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

Q225. Consider following given code and predict its output.      


main()     
 {          
 int num[ ] = {1,4,8,12,16};             
 int *a,*b;              
int i ;
a=num;             
b=num+2;               
i=*a+1;             
printf("%d,%d,%d\n",i,*a,*b);      
}  

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 3: Product of xed part and 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

Q228. What does a compiler do?

Op 1: Converts code from a high level language to a low level language

Op 2: Necessarily converts the code into assembly language

Op 3: Converts code from a low level language to a high level language

Op 4: Necessarily converts the code into machine language

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

a. None of the mentioned options

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

Q232. Number of possible ordered trees with 3 nodes A, B, C is ?

Op 1: 16

Op 2: 12

Op 3: 13

Op 4: 14

Q233. What is simplest way of implementing a graph in c or c++

a)associative lists

b)both adjacency matrix and associative list

c)none of these

d)adjacency matrix

Q234. Consider following functions and their complexities:


       F₁(n)=2?
       F₂₁(n)=n(³/²)
       F₃(n)Logn
       F₄ (n)=n(Logn) 
Which among the following options correctly represents the increasing order of asymptotic
 Complexity of the functions F₁,F₂,F₃,and F₄ respectively.
 

A. Non of the mentioned options


          

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?

A. All the mentioned options

B. When data is transferred asynchronously between two processes

C.When a resource is shared among multiple consumers.

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

Op 1: number3 > number2

Op 2: number3 > temp

Op 3: number3 < temp

Op 4: number3 > 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 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

Q240. What will be the output of the following pseudo-code statements:


integer a = 456, b, c, d =10
b = a/d
c=a-b
print c

Op 1: 410

Op 2: 410.4

Op 3: 411.4

Op 4: 411

Q241. Shravanti writes the following program:


integer i = 0, j
while ( i < 2 )
{j = 0;
while ( j <= 3*i )
{print j
print blank space
j = j + 3}
print end-of-line \takes the cursor to the next line
i=i+1
}

20

What will be the output of the program?

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?

A.  None of the mentioned options

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)

Q245. Sakshi writes a code in a high-level programming language on a Pentium-III


machine, which she wants to execute on a Motorola chip. What of the following will
she run on the code?

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   

It has one element

There is an error

None of these

Q247. integer a = 40, b = 35, c = 20, d = 10


Comment about the output of the following two statements:
print a * b / c - d
print a * b / (c - d)

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. It will print address of r


        

B. It will print address of k + address of r


        

C. It will print address of k


        

D. Compile time error

Q250. What will be the output of the following C code?


       
#include <stdio.h>
void main () 
{
int x = 9, y = 2, z = 6;
int a = x & y | z;
printf ("%d", a);
}

 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

A. reverse and concatenate two strings

B. concatenate two strings

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

C. reverse and copy both the strings

D. none of the mentioned option

Q252. .Which of the following is a direct search technique?

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 

Q255.  Mozilla Firefox is a/an 

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 1: No error, the program is correct.

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

Op 3: Object Oriented Programming

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?

      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

A. Will print all the values from 12 to 30


    

   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 

Q261. Consider the following code:


function modify(w,u)
{
w=w+2
u=u-3
return (w - u)
}
function calculate( )
{
integer a = 10, b = 20, c
c = modify(a, b);
print a
print space
print b
}
Assume that a was passed by value and b was passed by reference. What will be the
output of the program on executing function calculate( ) ?

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? 

No node. It will be empty 

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

Q264.  A stack is implemented as a linear array A[0…N-1].


Noor writes the following functions for popping an element from the stack. 
function POP( top, N )
 {
 if(X) 
{
 top = top - 1
 }
 else
 {
 print "Under ow"
 }
 return top
 }
 Fill in the condition X 

top< N-1   

top<n

top>1

top >= 0

Q265. Consider the following code:


if (condition 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 76/115
8/16/2019 if (condition 2) Six Phrase - mySlate
{ // Statement A }
else
if (condition 3)
{ // Statement B }
else
{ // Statement C }
else
if (condition 4)
{ // Statement D }
else
{ // Statement E}
}

Which of the following conditions will allow execution of statement C?

Op 1: condition1 AND condition3

Op 2: condition1 AND condition4 AND !condition2

Op 3: NOT(condition2) AND NOT(condition3)

Op 4: condition1 AND NOT(condition2) AND NOT(condition3)

Q266. int area(double radius)


{
return PI*radius*radius;
}
Which of the following is always true about the function area?

Op 1: It returns the area of a circle within the limits of double precision.

Op 2: It returns the area of a circle within the limits of the constant PI.

Op 3: It returns the area of a circle within the limits of precision of double, or


the constant PI, whichever is lower.

Op 4: None of the above

Q267.  Stack is useful for implementing: 

A. recursion

B. depth rst search 

C. both (A) & (B)

D. breadth rst search  

Q268. A program is compiled by Tarun on his machine. Whether it will run on a


different computer will depend upon:

Op 1: Operating system on the computer

Op 2: Hardware con guration of the computer


https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 77/115
8/16/2019 Six Phrase - mySlate

Op 3: Both operating system and hardware con guration

Op 4: The language of the program

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)

Q270. java source code is compiled into_________.

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 1: Code B is better because variable names are shorter

Op 2: Code A is better because the variable names are understandable and


nonconfusing 

Op 3: Code A will run correctly, while Code B will give an error.

Op 4: Code B will run correctly, while Code A will give an error. 

Q272. integer a = 10, b = 35, c = 5


Comment about the output of the two statements?
print a * b + c / d
print c / d + a * b

Op 1: Differ due to left-to-right precedence

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

Q273. consider the following pseudocode?


         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 pseudocode?

 A. 5
      

 B. 4
      

 C. 6
    

  D. 7

Q274. In which of the following situations queue implementation is useful?

 A.When a resource is shared among multiple consumers.

B. All the mentioned options.

C.Load balancing

D.When data is transferred asynchronously between two processes

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)

Q276. int 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. 1,4,8
      

B.  2,4,8
      

C. 4,4,8
      

D. 2,1,8

Q277. The number of control lines for a 8-to-1 multiplexer is: 

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 ) 

Q279.  Which of the following is a bad implementation for a queue?  

Circular List  

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 80/115
8/16/2019 Six Phrase - mySlate

Singly linked List

Linear Static Array

Q280.
What will be the necessary condition to get the desired element fom 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]
HI=MID-1
ELSE
LOW=MID+1

a.The elements in the array should be in the sorted form

b.The array should contain more than one elements

c.No pre condition is required for the algorithm to work

d. The elements in the array should be in unsorted form

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

Answer Key & Solution


Section 1 - Computer Fundamentals

Q1 b.n-1

Solution

No Solution

Q2 Op 4: bubble sort 

Solution

No Solution

Q3 Op 2: Use an interpreter on the rst 25 lines.

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

Q10  C. xy'+z

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

Q19 lastA->next = rstB

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

Q24 d.   All the mentioned options

Solution

No Solution

Q25 Op 2: Code A has higher time complexity

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

Q31 c.Dot per sq.inch

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

Q35 Op 3: Divide and conquer 

Solution

No Solution

Q36 d.compile time error

Solution

No Solution

Q37 a.28

Solution

No Solution

Q38 b.4

Solution

No Solution

Q39  c.it will print az2byaz2byaz2byaz2by…   

Solution

No Solution

Q40 b. 3 4 1 2

Solution

No Solution

Q41 Op 3: Vibhu cannot determine

Solution

No Solution

Q42 Op 3: It can handle incorrect input data or data types. 

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

Q44 c. When the insertion point reaches the right margin

Solution

No Solution

Q45      D.The elements in an array should be in the unsorted form

Solution

No Solution

Q46  B.32

      

Solution

No Solution

Q47 Op 3: condition1 AND condition2 AND condition4

Solution

No Solution

Q48 Op 3: Amount of memory required by the program to run

Solution

No Solution

Q49 top <n-1

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

Q54 It may be either linear or circular  

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

Q62 Op 1: The variables passed to it when it is called

Solution

No Solution

Q63 Op 3: 15

Solution

No Solution

Q64 d.1/n

Solution

No Solution

Q65 c.only the rear will change

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

Q72 Op 1: Before it is declared

Solution

No Solution

Q73 d.drag the mouse pointer through the characters to be selected

Solution

No Solution

Q74 input device

Solution

No Solution

Q75 a) red x

Solution

No Solution

Q76 Op 2: a - b + 1

Solution

No Solution

Q77 A. Reverse and concatenate two strings


https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 90/115
8/16/2019 Six Phrase - mySlate
       

Solution

No Solution

Q78 a.Successful

Solution

No Solution

Q79 a.both of P and Q.

Solution

No Solution

Q80 a. compilation error

Solution

No Solution

Q81 Op 1: O (1)

Solution

No Solution

Q82 Op 2: Machine Code

Solution

No Solution

Q83 Op 2: Reference only

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

Q86 Op 3: Gautam cannot determine

Solution

No Solution

Q87 Insertion sort

Solution

No Solution

Q88 c.All the mentioned options are correct

Solution

No Solution

Q89 (n+1)/2

Solution

No Solution

Q90 d.3

Solution

No Solution

Q91 Op 2: Returns the min of (a,b)

Solution

No Solution

Q92 Op 1: is far less than one 

Solution

No Solution

Q93 Op 2: Writing a step-by-step algorithm to solve the problem.

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

Q98 D. All the mentioned options are correct

Solution

No Solution

Q99 Op 1: 50

Solution

No Solution

Q100 A. Both of P and Q

        

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

Q107 both 1 and 3

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

Q111 Op 3: Hash Coded Search 

Solution

No Solution

Q112 Op 2: 00101111

Solution

No Solution

Q113 Op 1: Code A

Solution

No Solution

Q114 C. It will display four if x <= y.

        

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

Q122 B:the number depends on the shape of the tree.

      

Solution

No Solution

Q123 b.3

Solution

No Solution

Q124 Op 1: Cannot be partitioned without removing an edge 

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

Q128 Op 1: Statement 1 is changed to:

while (n <=6 AND isdivisible=0)

Solution

No Solution

Q129 A.  only the rear will change

         

Solution

No Solution

Q130 Op 1: Code A uses lesser memory and is slower than Code B

Solution

No Solution

Q131 A. 6

      

Solution

No Solution

Q132 Op 1: Queue implemented in a linear array

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

Q136 D. All the mentioned options

Solution

No Solution

Q137 Queue implemented in a linear array 

Solution

No Solution

Q138 Op 3: recursion

Solution

No Solution

Q139 B.72

              

Solution

No Solution

Q140 Op 2: Two loops, one inside the others

Solution

No Solution

Q141 Op 2: commission = 200 * 5 + (numberProducts - 200) * 10

Solution

No Solution

Q142 d.1 half-adder,15 full-adders

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

Q146 Op 4: Bubble sort 

Solution

No Solution

Q147 Op 1: it may be either linear or circular

Solution

No Solution

Q148 Op 2: Binary search

Solution

No Solution

Q149 40 

Solution

No Solution

Q150 Heap sort and Merge sort

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

Q153 Op 2: NOT(condition1) AND condition2 AND NOT(condition4)

Solution

No Solution

Q154 Op 1: 1

Solution

No Solution

Q155 A. All the mentioned options

         

Solution

No Solution

Q156  C. broadcast,unicast

Solution

No Solution

Q157 a.x=3;y=4;z=2   

Solution

No Solution

Q158 Op 2: Use functions

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

Q162 a < 1.0

Solution

No Solution

Q163 Op 4: A program needs to be compiled once but can be run several times.

Solution

No Solution

Q164 Op 3: 1 + n, if n > 1, 1 otherwise 

Solution

No Solution

Q165 Op 2: 5

Solution

No Solution

Q166 Op 1: The code will not compile.

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

Q168 d.it will display 4 if x<=y

Solution

No Solution

Q169 Op 2: From top to bottom

Solution

No Solution

Q170 Op 3: 40

Solution

No Solution

Q171 Op 4: 3

Solution

No Solution

Q172 Op 1: Returns the max of (a,b)

Solution

No Solution

Q173 d.4

Solution

No Solution

Q174 Op 1: Code A

Solution

No Solution

Q175 Op 1: is always even

Solution

No Solution

Q176 B.calculate X^Y


https://admin.myslate.sixphrase.com/module/test/preview?test_id=cf528351-b795-4346-bcab-8c6024a50e5c&branch_id=c06873a3-d4df-49e9-ae9d-6f061f22a5a6&isprint=true 102/115
8/16/2019 Six Phrase - mySlate

Solution

No Solution

Q177 Op 2: Interpreter, Compiler

Solution

No Solution

Q178 Op 2: -1 if a > b, 1 if a < b, 0 otherwise

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

Q182 d.compliation error

Solution

No Solution

Q183 c.none of these

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

Q186 Op 4: return n*factorial(n-1)

Solution

No Solution

Q187 Op 1: 7

Solution

No Solution

Q188 Insertion sort

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

Q193 a) Presentation layer

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

Q200 Op 2: Code B will execute faster than Code A

Solution

No Solution

Q201 C.  inside else

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

Q202 c) None of these

Solution

No Solution

Q203 2n - 1 nodes

Solution

No Solution

Q204 c.Traversing an array

Solution

No Solution

Q205 d.Hashing

Solution

No Solution

Q206 :A.10

    

Solution

No Solution

Q207 Address of next node in sequence 

Solution

No Solution

Q208 Op 1: Code A

Solution

No Solution

Q209 A. insertion element in an array

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

Q214 Op 1: Queue implemented in a linear array

Solution

No Solution

Q215 Op 2: They are not executed

Solution

No Solution

Q216 Op 2: Statement 2

Solution

No Solution

Q217 A. Calculate X+X*Y

        

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

Q218 Op 2: selection sort 

Solution

No Solution

Q219 d.6

Solution

No Solution

Q220 A. theta(m)

      

Solution

No Solution

Q221 Op 2: O (n)

Solution

No Solution

Q222 Op 3: simulation of limited resource allocation 

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

Q226 Op 2: Variable Part

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

Q229 c) Transport layer

Solution

No Solution

Q230 a queue

Solution

No Solution

Q231 c.100

Solution

No Solution

Q232 Op 2: 12

Solution

No Solution

Q233 b)both adjacency matrix and associative list

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

Q236 A. All the mentioned options

Solution

No Solution

Q237 Op 1: Top-down Approach 

Solution

No Solution

Q238 Op 2: number3 > temp

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

Q246 It has one element

Solution

No Solution

Q247 Op 1: Differ by 80

Solution

No Solution

Q248 Op 4: i = i + 5

Solution

No Solution

Q249 D. Compile time error

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

Q251 B. concatenate two strings

Solution

No Solution

Q252 D. Hashing

Solution

No Solution

Q253 b.inside else

Solution

No Solution

Q254 Op 3: heap sort

Solution

No Solution

Q255 web browser

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

Q259 A. Will print all the values from 12 to 30

    

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

Q264 top >= 0

Solution

No Solution

Q265 Op 4: condition1 AND NOT(condition2) AND NOT(condition3)

Solution

No Solution

Q266 Op 4: None of the above

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

Q268 Op 3: Both operating system and hardware con guration

Solution

No Solution

Q269 Op 4: It is &omega(n)

Solution

No Solution

Q270 a.byte code

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

Q274 D.When data is transferred asynchronously between two processes

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

Q279 Linear Static Array

Solution

No Solution

Q280 a.The elements in the array should be in the sorted form

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

You might also like