Beruflich Dokumente
Kultur Dokumente
Section Summary
No. of Questions: 357
Duration: 10 min
Additional Instructions:
None
Q1. 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?
A.Header les
B.Iteration
C.Comments
D.Preprocessor directive
Q2. 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.
A.30
B.4165
C.40
D.4166
Q3. A data type is stored as an 6 bit signed integer. Which of the following cannot be represented by this data type?
A. -12
B. 0
C.32
D.18
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 1/136
6/24/2019 Six Phrase - mySlate
E.64
Q4. A language has 28 different letters in total. Each word in the language iscomposed of maximum 7 letters. You want to create a
data-type to store a word ofthis 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.
a.7
b.35
c.28
d.196
a.0 to 1000
b.0 to 1024
c.1 to 1025
d.0 to 1023
Q6. 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?
a. a = 10 b = 200
b. a = 200 b = 10
c. a = 50 b = 100
d. a = 100 b = 50
a. linker
b. compiler
c. executer
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 2/136
6/24/2019 Six Phrase - mySlate
d. loader
Q8. Tricha wants to store a list of binary data.Which of following data types should she use?
a. Integer
b. Float
c. Character
d. Boolean
Q9. Which of the following options is an exception to being a part of composite data types?
a. Union
b. Array
c. Structure
d. Stack
Q10. The datatype is store as 6 but unsigned integer. Which of the following can’t be represented by the this datatype:
a. -12
b. 0
c. 32
d. 18
Q11. Choose the correct answer Saumya writes a code which has a function which calls itself. Which programming concept is Saumya
using?
b. Recursion
c. Decision Making
d. Overloading
Q12. 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?
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 3/136
6/24/2019 Six Phrase - mySlate
a. 50
b. 200
c. 35
d. 20
Q13. Choose the correct answer 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?
a. Always -1
d. 0 if a equals b, -1 otherwise
Q14. Choose the correct answer 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?
b. Use functions
c. Use arrays
d. Use classes
Q15. Talika wants to implement heterogeneous linked list for her project. Which of the following will help her do the same.
a. Void pointer
b. Null pointer
c. Wild pointer
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 4/136
6/24/2019 Six Phrase - mySlate
a. 80
b. 40
c. 32
d. 72
Q18. What is the term given to the variable whose scope is beyond all the scopes i.e., it can be accessed by all the scopes?
a. Universal Variable
b. Global Variable
c. External Variable
d. Auto Variable
Q19. Anu wants to make a function that is not bound to any identi er.which of the following functions should she incorporate in her
program?
a. Anonymous Function
b. Friend Function
c. Null Function
d. Global Function
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 5/136
6/24/2019 Six Phrase - mySlate
Q20. Which of the following accessibility modes can be the speci er of a top level class’?Top-level classes can only have public,
abstract, and nal modi ers, and it is also possible to not de ne any class modi ers at all. This is called default/package
accessibility. Besides that, private, protected, and static modi ers cannot be used when declaring top-level classes. Private,
Protected, Public, No Modi er
a. Only Private
d. Only No Modi er
Q21. Top-level classes can only have public, abstract, and nal modi ers, and it is also possible to not de ne any class modi ers at all.
This is called default/package accessibility. Besides that, private, protected, and static modi ers cannot be used when declaring
top-level classes.
Question 6 WRONG
Which of the following accessibility modes can be the specifier of a top level class’?Top-level classes can only have public,
abstract, and nal modi ers, and it is also possible to not de ne any class modi ers at all. This is called default/package
accessibility. Besides that, private, protected, and static modi ers cannot be used when declaring top-level classes. Private,
Protected, Public, No Modi er
a. Only Private
d. Only No Modi er
Q22. Top-level classes can only have public, abstract, and nal modi ers, and it is also possible to not de ne any class modi ers at all.
This is called default/package accessibility. Besides that, private, protected, and static modi ers cannot be used when declaring
top-level classes.
Question 7 WRONG
Choose the correct answer. A pseudo-code which is similar to that of C++ and self-explanatory An accessible member function or
data member for an object are accessed by the statement objectname.functionname or objectname. data member name
respectively. class brush { Private: integer size, colorcode function getdata( ) {–}//Statement 1 public: integer name // Statement 2
function putdata(){…} } function main { brush b1, b2 print bl.name //Statement 3 b2.getdata() //Statement 4 } Deleting which line
will correct the error in the code?
a.Statement 1
b.Statement 2
c.Statement 3
d.Statement 4
Q23. Function MyDisplay(string MyStr) //statement 1 { print “Hello !” print MyStr return 1 // statement 2 } function main() //statement 3 {
string str= “Mickey” MyDisplay(str) // statement 4 } Which statement will generate an error.
a.Statement 1
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 6/136
6/24/2019 Six Phrase - mySlate
b.Statement 2
c.Statement 3
d.Statement 4
Q24. Choose the correct answer 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.
a. n equals 1
b. n equals 2
c. n >= 1
d. n > 1
Q25. Choose the correct answer 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.
a.return factorial(n-1)
b.return n*factorial(n)
c.return n*(n-1)
d.return n*factorial(n-1)
a) -1
b) 0
c) 1
d) 10
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 7/136
6/24/2019 Six Phrase - mySlate
c) FILE is a stream
a) A character string containing the name of the le & the second argument is
the mode
b) A character string containing the name of the user & the second argument
is the mode
Q29. If there is any error while opening a le, fopen will return
a) Nothing
b) EOF
c) NULL
d) Depends on compiler
a) int type
b) char * type
c) struct type
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 8/136
6/24/2019 Six Phrase - mySlate
Q34. Which of the following functions from “stdio.h” can be used in place of printf()?
a) True
b) False
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 9/136
6/24/2019 Six Phrase - mySlate
Q36. puts function adds newline character
a) True
b) False
a) Subscripted variable
b) Collective array
c) Ordinary variable
Q38. Till the array elements are not given any speci c value, they are supposed to contain all ____________
a) Zero
b) Garbage value
c) One
Q39. If an array is initialized where it is declared, then mentioning __________ of array is optional.
a) Data type
b) Dimension
c) name
Q40. What happen if we assign a value to an array element whose subscript exceeds the size of array.
b) No output
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 10/136
6/24/2019 Six Phrase - mySlate
d) none of these
a) 2, 2, 4
b) 3, 2, 32
c) 3, 2, 4
d) 2, 3, 32
Q42. What will be output of the following program where c=65474 and int=2 bytes.
int main()
{
int c[3][4]={2,3,1,6,4,1,6,2,2,7,1,10};
printf(“%u, %u\n”, c+1, &c+1);
return 0;
}
a) 65482, 65498
b) 65476, 65476
c) 65476, 65498
d) No output
a) garbage value,1,2,3,4
b) 1,2,3,4,5
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 11/136
6/24/2019 Six Phrase - mySlate
c) Error
d) Program crash
a) 16 bytes, 4 bytes
b) 4 bytes, 4 bytes
c) 8 bytes, 4 bytes
d) None of these
a) int fun(arr)
d) None of these
a) second
b) rst
c) both
d) none of these
a) Call by reference
b) call by value
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 12/136
6/24/2019 Six Phrase - mySlate
d) Both a and c
b) 4
c) No output
d) Program crashes
Q50. What does argv and argc indicate in int main(int argc, char *argv[]) ?
a) MultiDimensional Array
b) Jagged Array
c) 2-Dimensional Array
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 13/136
6/24/2019 Six Phrase - mySlate
Q52. The maximum length of the command-line arguments including the spaces is
b)256 characters
d)128 characters
a) argc
b) argc * 2
c) argc – 1
d) argc + 1
a)File Name
b)Program Designation
d)Program Name
a)Array of pointers
d)Array of Strings
Q56. What will be the output of the following program if argument passed to command lines are : prog 1 4 2
#include<stdio.h>
int main(int argc, char *argv[])
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 14/136
6/24/2019 { Six Phrase - mySlate
int j;
j = argv[1] + argv[2] – argv[3];
printf(“%d”, j);
return 0;
}
a)Error
b)3
c)Garbage Value
d)None of these
d) None of these.
a) Number of Arguments
b) Number of Arguments – 1
c) Number of Arguments + 2
d) Number of Arguments + 1
Q59. What will be output of the following program if argument passed to command lines are : prog 1 4 2
#include<stdio.h>
int main(int argc, char *argv[])
{
while(argc–)
printf(“%s\n”,argv[argc]);
return 0;
}
a) 2 4 1
b) Garbage-value 2 4 1
c) Garbage-value 2 4 1 prog
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 15/136
6/24/2019 Six Phrase - mySlate
d) In nte Loop
Q60. What will be output of the following program if argument passed to command lines are : demo one two three
#include<stdio.h>
int main(int argc, char *argv[])
{
printf(“%c\n”,**+argv);
return 0;
}
a) n
b) o
c) t
Q61. What will be output of the following program if argument passed to command lines are : demo friday
#include<stdio.h>
int main(int argc, char *argv[])
{
printf(“%c”,*++argv[1]);
return 0;
}
a) r
b) f
c) i
d) d
a) SimpleWay2Code
c) Nothing
d) Varies
void main()
{
static int x = 3;
x++;
if (x <= 5) { printf(“hello ”); main(); } }
b) hello
c) In nite hello
d) hello hello
Q64. The value obtained in the function is given back to main by using ________ keyword?
a) return
b) static
c) new
d) volatile
Q65. What is the problem in the following declarations? int func(int); double func(int); int func( oat);
a) int
b) oat
c) double
Q67. What is the output of this code having void return-type function? #include
void foo()
{
return 1;
}
void main()
{
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 17/136
6/24/2019 int x = 0; Six Phrase - mySlate
x = foo();
printf(“%d”, x);
}
a) 1
b) 0
c) Runtime error
a) hello 5
b) Error
c) Nothing
d) Garbage value
a) 5
b) Junk value
c) 0
d) Error
int i=1;
if(!i)
printf(“SimpleWay2Code,”);
else
{
i=0;
printf(“C-Program”);
main();
}
return 0;
}
A. In nite times
B. 32767 times
C. 65535 times
a.I am 5
b.I am not 5
c.I am different
d.Error
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 19/136
6/24/2019 Six Phrase - mySlate
Q73. Ashima wants to print a pattern which includes checking and changing a variables value iteratively She decides to use a
loop/condition Which of the following options should she use such that the body of the loop/condition is executed atleast once
whether the variable satis es the entering condition or not?
a.For Loop
b.While Loop
d.Switch Case
Q74. The construct “if (condition) then A else B” is for which of the following purposes? 1) 2) 3) 4)
a.Decision-Making
b.Iteration
c.Recursion
Q75. Ravi and Rupali are asked to write a program to sum the rows of 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):
Q76. 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)
Comment about the output of the following two statements
a.Differ by 80
b.Same
c.Differ by 50
d.Differ by 160
Q77.
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 20/136
6/24/2019 Six Phrase - mySlate
Ashima wants to print a pattern which includes checking and changing a variables value iteratively She decides to use a
loop/condition Which of the following options should she use such that the body of the loop/condition is executed atleast once
whether the variable satis es the entering condition or not?
a.For Loop
b.While Loop
d.Switch Case
Q78. What is the output of the following pseudo code? Int a =456,b,c,d=10; b=a/d; c=a-b; print c;
a.411.4
b.411
c.410.4
d.410
Q79. The construct “if (condition) then A else B” is for which of the following purposes?
a.Decision-Making
b.Iteration
c.Recursion
Q80. Function main() { Integer i=0.7 Static oat m=0.7 If(m equals i) Print(“We are equal”) Else If(m>i) Print(“I am greater”) Else Print(“I
am lesser”)
b.I am greater
c.I am lesser
a) 0
b) 1
c) Garbage Value
a) true
d) Nothing
a) 0
b) Garbage Value
d) Nothing
a) 9
b) 4
c) 5
d) 0
d) Within the block it appears & Within the blocks of the block it appears
a) stack
b) queue
c) priority queue
d) random
a) enum
b) union
c) auto
d) volatile
a) stack
b) data segment
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 23/136
6/24/2019 Six Phrase - mySlate
c) register
d) heap
b) 10 10
c) 11 11
a) true
b) false
a) stack
b) registers
c) heap
d) main memory
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 24/136
6/24/2019 Six Phrase - mySlate
a) Hello
b) World
c) No Output
d) Depends on Compiler
a) hi
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 25/136
6/24/2019 Six Phrase - mySlate
c) hello
d) hihello
Q96. The following code ‘for(;;)’ represents an in nite loop. It can be terminated by.
a) break
b) exit(0)
c) abort()
Q97. The correct syntax for running two variable for loop simultaneously is.
Q98. Which for loop has range of similar indexes of ‘i’ used in for (i = 0;i < n; i++)?
c) Nothing
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 26/136
6/24/2019 Six Phrase - mySlate
d) Varies
c) Outside loop
d) In nite loop
a) Inside while loop Inside while loop Inside while loop
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 27/136
6/24/2019 Six Phrase - mySlate
Q103. Which of the following cannot be used as LHS of the expression in for (exp1 ;exp2 ; exp3) ?
a) Variable
b) Function
c) typedef
d) macros
a) break
b) return
c) exit
a) do-while
b) if-else
c) for
d) while
Q106. Which keyword is used to come out of a loop only for single iteration?
a) break
b) continue
c) return
}
}
b) Hello
c) Varies
a) int __v1;
b) int __1v;
c) int __V1;
d) None
a) int _v1;
b) int v_1;
c) int 1_v;
d) int _1v
b) To avoid con icts since assemblers and loaders use such names
a) int number;
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 29/136
6/24/2019 Six Phrase - mySlate
b) oat rate;
c) int variable_count;
d) int $main;
a) compile-time error
b) run-time error
a) friend
b) true
c) volatile
d) export
Q114. The format identi er ‘%i’ is also used for _____ data type?
a) char
b) double
c) oat
d) int
a) Basic datatype of C
b) Quali er
a) 128
b) -128
a) 4 Bytes
b) 8 Bytes
d) Cannot be determined
a) int
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 31/136
6/24/2019 Six Phrase - mySlate
b) struct
c) oat
d) double
a) 97.000000
c) a.0000000
d) a
a.Virtual class
b.Abstract class
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 32/136
6/24/2019 Six Phrase - mySlate
c.Singleton class
d.Friend class
Q124. Which of the following concepts of OOPS means exposing only necessary information to client?
a.Encapsulation
b.Abstraction
c.Data hiding
d.Data binding
b.Multiple inheritance
c.Hybrid inheritance
a.Friend function
b.Static function
c.Destructor
Q127. Which of the following are available only in the class hierarchy chain?
d.Member functions
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 33/136
6/24/2019 Six Phrase - mySlate
a.Multiple
b.Multilevel
c.Distributive
d.Hierarchical
Q129. The process of building new classes from existing one is called ______.
a.Polymorphism
b.Structure
c.Inheritance
d.Cascading
Q130. Which of the following supports the concept of hierarchical classi cation?
a.Polymorphism
b.Encapsulation
c.Abstraction
d.Inheritance
Q131. Which Keyword from the following is used to inherit properties from one class into another?
a.extends
b.subclasses
c.native
Q132. Which one of the following connects the high-speed high-bandwidth device to memory subsystem and CPU.
a.expansion bus
b.PCI bus
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 34/136
6/24/2019 Six Phrase - mySlate
c.SCSI bus
Q133. The _________ present a uniform device-access interface to the I/O subsystem, much as system calls provide a standard interface
between the application and the operating system.
a.devices
b.buses
c.device drivers
d.I/O systems
Q134. .When device A has a cable that plugs into device B, and device B has a cable that plugs into device C and device C plugs into a
port on the computer, this arrangement is called a _________.
a.port
b.daisy chain
c.bus
d.cable
Q135. The _________ determines the cause of the interrupt, performs the necessary processing and executes a return from the interrupt
instruction to return the CPU to the execution state prior to the interrupt.
b.device driver
c.interrupt handler
d.All of these
a. ow in
b. ow out
c.data in
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 35/136
6/24/2019 Six Phrase - mySlate
d.data out
a.status
b.control
c.data in
d.data out
Q138. The CPU hardware has a wire called __________ that the CPU senses after executing every instruction.
b.interrupt bus
Q139. The _________ are reserved for events such as unrecoverable memory errors.
a.non-maskable interrupts
b.blocked interrupts
c.maskable interrupts
d.None of these
Q140. The hardware mechanism that allows a device to notify the CPU is called _______.
a.polling
b.interrupt
c.driver
d.controlling
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 36/136
6/24/2019 Six Phrase - mySlate
a.adhoc polymorphism
b.imperative polymorphism
c.predicative polymorphism
d.inclusion polymorphism
Q142. What is the function used to describe the situation, when a function in base class is rede ned in inherited class?
a.Inheritance
b.Overriding
c.Overloading
d.Encapsulation
d.None of these
Q144. A complete binary tree with the property that the value at each node is at least as large as the values at its children is known as
b.AVL tree
d.Heap
a.Virtual polymorphism
b.Transient polymorphism
c.Ad-hoc polymorphism
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 37/136
6/24/2019 Six Phrase - mySlate
d.Pseudo polymorphism
a.>>
c.?:
d.*
a.Operator overloading
b.Function overloading
c.Templates
a.Overload
b.Operator
c.Friend
d.Override
d.cannot be overloaded
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 38/136
6/24/2019 Six Phrase - mySlate
A) break
B) continue
C) goto
D) return
Q151. Which of the following does not require to include math.h header le?
A) pow()
B) rand()
C)sqrt()
D) sinh()
A. oat
B. double
D. Long int
C) It compares 0 with 0 and since they are equal it will exit the loop
immediately
D) It has syntax error as the same number is being compared with itself
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 39/136
6/24/2019 Six Phrase - mySlate
A) 2 or 4
B) 1 or 3
C) Garbage value
D) ASCII value of a
A) 19
B) 20
C) 22
D) 23
A) Error
B) 10,10,10,10
A) printf(“%ll\n”,fact(5));
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 40/136
6/24/2019 Six Phrase - mySlate
B) printf(“%u\n”,fact(5));
C) printf(“%d\n”,fact(5));
D) printf(“%ld\n”,fact(5));
Q158. If a function’s return type is not explicitly de ned then it’s default to ______ (In C).
A) int
B) oat
C) void
D) Error
A) 5
B) 1
C) 0
D) 3
a) 11
b) 13
c) 15
d) 10
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 41/136
6/24/2019 Six Phrase - mySlate
Q161. atoi() function is used for:
a) strlen()
b) strcpy()
c) strptr()
d) strupr()
a) and()
b) pow()
c) exp()
d) acos()
a) In a Queue
b) In stack Memory
c) In hard Disk
d) In heap Memory
Q165. while declaring parameters for main, the second parameter argv should be declared as
a) char argv[]
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 42/136
6/24/2019 Six Phrase - mySlate
b) char argv
c) char ** argv[]
d) char * argv[]
1. Linked Lists
2. Array of structures
3. All of these
4. Binary Tree
3. None of these
Q169. Strings are character arrays. The last index of it contains the null-terminated character
1. \t
2. \1
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 43/136
6/24/2019 Six Phrase - mySlate
3. \0
4. \n
1. String
2. Structure
3. Array
4. Files
a) feof()
b) EOF
Q172. If a functions return type is not explicitly de ned then it is default to ……….(in C).
a) int
b) oat
c) void
d) error
a) Disk
b) Stack
c) Heap
d) Register
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 44/136
6/24/2019 Six Phrase - mySlate
Q174. How many times loop will executed ?
#include
int main()
{
int i;
for(i=0;i<5;i++)
{
printf(“Hello\n”);
}
}
a) 0
b) 1
c) 3
d) 5
b) points to function
c) Both A and B
d) None of these
a) looping
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 45/136
6/24/2019 Six Phrase - mySlate
Q178. What is the similarity between enum and struct ?
c) nothing in common
a) Enum
c) Long int
d) double
a) Compilation error
b) Runtime error
c) 4
d) 1
Q181. What function should be used to free the memory allocated by calloc() ?
1. free();
2. malloc(variable_name, 0)
3. dealloc();
4. memalloc(variable_name, 0)
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 46/136
6/24/2019 Six Phrase - mySlate
Q182. In the standard library of C programming language, which of the following header le is designed for basic mathematical
operations?
1. conio.h
2. stdio.h
3. math.h
4. dos.h
1. Pointer to integer
2. None of these
3. Pointer to pointer
4. Invalid declaration
1. (underscore)
2. – (hyphen)
3. | (pipeline)
4. * (asterisk)
1. Uppercase letters
2. None of these
3. Lowercase letters
}
int main(){
char* string = (char*)malloc(64);
strcpy(string, “hello_World”);
myfunc(&string);
myfunc(&string);
printf(“%s\n”, string);
// ignore memory leak for sake of quiz
return 0;
}
1. hello_World
2. ello_World
3. lo_World
4. llo_World
a) 5 5 5
b) 5 5 junk
c) 5 junk junk
Q188. Which of the following statements about stdout and stderr are true?
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 48/136
6/24/2019 Six Phrase - mySlate
A) 2,3
B) 1,2
C) 1,2,3
D) 1,2,3,4
B) all the variable declared inside the function automatically will be assigned
initial value of zero
a) calloc
b) malloc
c) Both calloc & malloc
d) free
a) char
b) int
C. char *
a) Static area
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 49/136
6/24/2019 Six Phrase - mySlate
b) Stack area
c) Heap area
a) 1 bit
b) 2 bits
c) 1 Byte
d) 2 Bytes
a) char
b) short
c) unsigned int
d) long
a) remove(p);
b) delete(p);
c) free(p);
d) terminate(p);
a) x is 97
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 50/136
6/24/2019 Six Phrase - mySlate
b) x is 98
c) x is 99
Q198. Which is the character array used to accept command line arguments?
A) char argv
B) char* argv[]
C) char argv[]
D) char* argv
A) strstr
B)strcmp
C) strupr
D) strchr
A) Expanding
B) Compiling
C) Linking
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 51/136
6/24/2019 Six Phrase - mySlate
Q202. In _____________tree, the heights of the two child subtrees of any node differ by at most one
Binary tree
Splay tree
AVL tree
Q203. In a heap, element with the greatest key is always in the ___________ node
leaf
root
Hash tables
Heaps
Both a and b
Skip list
Binary trees
Stacks
Graphs
Both a and c
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 52/136
6/24/2019 Six Phrase - mySlate
Q207. The time required in best case for search operation in binary tree is
O(n)
O(1)
O(2n)
O(log 2n)
Q208. Which of the following statements hold true for binary trees?
The left subtree of a node contains only nodes with keys less than the node's
key
The right subtree of a node contains only nodes with keys greater than the
node's key.
Both a and b
Both left and right subtree nodes contains only nodes with keys less than the
node's key
0, 0.000000
Garbage values
Error
None of these
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 53/136
6/24/2019 Six Phrase - mySlate
Q210. For a typical program, the input is taken using
a) scanf
b) Files
c) Command-line
20
40
Error
No Output
Error
None of these
Q213. In the following program how long will the for loop get executed?
#include<stdio.h>
int main()
{
int i=5;
for(;scanf("%s", &i); printf("%d\n", i));
return 0;
}
Q214. Point out the error in the following program (if it is compiled with Turbo C compiler).
#include<stdio.h>
int main()
{
display();
return 0;
}
void display()
{
printf("Welcome");
}
No Error
None of these
printf("%d", v);
return 0;
No error
None of these.
Q216. Which of the following is correct about err used in the declaration given below?
typedefenum error { warning, test, exception } err;
It is a structure
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 55/136
6/24/2019 Six Phrase - mySlate
Q217. Which of the following correctly represents a long double constant?
6.68
6.68L
6.68f
6.68LF
Queue
Stack
Linked List
Tree
intdoSomething(int a, int b)
{
if (b==1)
return a;
else
return a + doSomething(a,b-1);
}
doSomething(2,3);
Q220. What will happen if the base condition is not de ned in recursion
Stack under ow
Stack over ow
None of these
Both A and B
{
return (num) ? num%10 + rec(num/10):0;
}
main(){
printf("%d",rec(4567));
}
12
22
21
12
24
24
11
22
21
0011
1100
1001
1000
40
36
15
Q226. The average time required to perform a successful sequential search for an element in an array A(1 : n) is given by
(n + 1)/2
log2n
n(n + 1)/2
n2
Q227. The time complexity of linear search algorithm over an array of n elements is
O(n)
O (log2 n)
O(n log2 n)
O (n2)
Q228. Using the standard algorithm, what is the time required to determine that a number n is prime?
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 58/136
6/24/2019 Six Phrase - mySlate
Linear time
Logarithmic time
Constant time
Quadratic time
Q229. The average time required to perform a successful sequential search for an element in an array A (1 : n) is given by
(n+1)/2
n (n + 1)/2
log(n/2)
n2
A serial search is useful when the amount of data that must be search is
small
For a serial search to work, the data in the array must be arranged in either
alphabetical or numerical order
Q231. A _____ search begins the search with the element that is located in the middle of the array
serial
random
parallel
binary
Q232. Which of the following sorting algorithms does not have a worst case running time of O(n2)?
Insertion sort
Merge sort
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 59/136
6/24/2019 Six Phrase - mySlate
Quick sort
Bubble sort
O(log2 n)
O(n)
O(1)
O(n2)
Q234. For a linear search in an array of n elements the time complexity for best, worst and average case are ......., ....... and ........
respectively
Q235. The worst case time required to search a given element in a sorted linked list of length n is
O(1)
O(log2 n)
O(n)
O(n log2 n)
Q236. In _____________tree, the heights of the two child subtrees of any node differ by at most one
Binary tree
Splay tree
AVL tree
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 60/136
6/24/2019 Six Phrase - mySlate
Q237. In a heap, element with the greatest key is always in the ___________ node
leaf
root
Hash tables
Heaps
Both a and b
Skip list
nodes
data
both a and b
address
Binary trees
Stacks
Graphs
Both a and c
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 61/136
6/24/2019 Six Phrase - mySlate
Q242. The time required in best case for search operation in binary tree is
O(n)
O(1)
O(2n)
O(log 2n)
Fixed size
Q244. Which of the following statements hold true for binary trees?
The left subtree of a node contains only nodes with keys less than the node's
key
The right subtree of a node contains only nodes with keys greater than the
node's key.
both a and b
Noth left and right subtree nodes contains only nodes with keys less than the
node's key
Q245. Which of the following points is/are true about Linked List data structure when it is compared with array
Arrays have better cache locality that can make them better in terms of
performance.
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 62/136
6/24/2019 Six Phrase - mySlate
The size of array has to be pre-decided, linked lists can change their size any
time.
for the size of the structure and the data in the structure are constantly
changing.
data structure
for the size of the structure and the data in the structure are constantly
changing.
data structure
Q249. A linear collection of data elements where the linear node is given by means of pointer is called?
Linked list
Node list
Primitive list
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 63/136
6/24/2019 Six Phrase - mySlate
Q250. In linked list each node contain minimum of two elds. One eld is data eld to store the data second eld is?
Pointer to character
Pointer to integer
Pointer to node
Node
Data
Link
To implement le systems
Computational Time
Space Utilization
sorting
merging
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 64/136
6/24/2019 Six Phrase - mySlate
inserting
traversal
Guard
Sentinel
End pointer
Last pointer
number of records
Q258. A linear list in which the pointer points only to the successive node is ……
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 65/136
6/24/2019 Six Phrase - mySlate
Q259. What kind of list is best to answer questions such as: “What is the item at position n?”
Singly-linked lists.
Doubly-linked lists.
Q260. Memory is allocated dynamically to a data structure during execution by ——- function.
malloc()
realloc()
Calloc()
Q261. To create a linked list, we can allocate space and make something point to it, by
writing:
struct-name *pointer-variable;
Which of the following statement will correctly allocate the space
pointer-variable=(struct-name*)malloc(sizeof(struct-name));
pointer-variable =(struct-name*)alloc(sizeof(*struct-name));
struct node
{
int data;
struct node * next;
}
typedef struct node NODE;
NODE *ptr;
ptr = (NODE*)malloc(sizeof(NODE));
ptr = (NODE*)malloc(NODE);
ptr = (NODE*)malloc(sizeof(NODE*));
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 66/136
6/24/2019 Six Phrase - mySlate
ptr = (NODE)malloc(sizeof(NODE));
Dynamic
Static
Compile time
Q264. ………. may take place only when there is some minimum amount(or) no space left in free storage list.
Memory management
Garbage collection
Recycle bin
Q265. Suppose that p is a pointer variable that contains the NULL pointer.
What happens if your program tries to read or write *p?
Q266. In a single linked list which operation depends on the length of the list.
Q267. Consider an implementation of unsorted singly linked list. Suppose it has its representation with a head pointer only.
Given the representation, which of the following operation can be implemented in O(1) time?
i)Insertion at the front of the linked list
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 67/136
6/24/2019 ii)Insertion at the end of the linked list Six Phrase - mySlate
I and II
I and III
I, II and III
I, II and IV
Q268. What does the following function do for a given Linked List with rst node as head?
current=head;
while(current->next!=NULL)
{
if (current->data == current->next->data)
{
____
}
else
{
current = current->next;
}
}?
p=current->next->next;free(current);current->next = p;
p=current->next;free(p);
p=current->next;free(current->next);current->next=p;
p= current->next->next;free(current->next);current->next = p;
Q270. "p" and "q" are pointers to a node of the linked list,
"head" points to the rst node of the list, "next"
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 68/136
6/24/2019 points to the next node in the list, which of the Six Phrase - mySlate
Q271. What does the following function return, if q contains the address of the rst element?
Q272. What is the output of following function for start pointing to rst node of following linked list? 1->2->3->4->5->6
void fun(struct node* start)
{
if(start == NULL)
return;
printf("%d ", start->data);
if(start->next != NULL )
fun(start->next->next);
printf("%d ", start->data);
}
146641
135135
1235
135531
int data;
struct node *next;
};
typedef struct node NODE;
Structure declaration
newnode->next = tptr;
start = newnode;
}
else
{
prev->next = newnode;
newnode->next = tptr;
}
}
}
Error
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 70/136
6/24/2019 Six Phrase - mySlate
Error
Error
Where fwd and bwd represents forward and backward links to adjacent
elements of the list. Which among the following segments of code
deletes the element pointed to by X from the double linked list, if it is
assumed that X points to neither the rst nor last element of the list?
X -> bwd -> fwd = X -> bwd; X -> fwd -> bwd = X -> fwd
X -> bwd -> fwd = X -> fwd; X -> fwd -> bwd = X -> bwd
X -> bwd -> bwd = X -> bwd; X -> fwd -> fwd = X -> fwd
X -> bwd -> bwd = X -> fwd; X -> fwd -> fwd = X -> bwd
Q278. Which among the following segment of code deletes the element
pointed to by X from the double linked list, if it is assumed that X
points to the rst element of the list and start pointer points to
beginning of the list?
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 71/136
6/24/2019 Six Phrase - mySlate
X -> bwd -> bwd = X -> bwd; X -> fwd -> fwd = X -> fwd
The function doesn't print the last node when the linked list is not empty
newnode->data=num;
newnode->prev=NULL;
newnode->next=NULL;
if(start==NULL)
start = newnode;
else
{
for(tptr=start; tptr&&tptr->next && num>tptr->data; tptr=tptr->next);
if(tptr==start)
{
newnode->next = tptr;
tptr->prev = newnode;
start = newnode;
}
else if(tptr!=NULL&&tptr->next!=NULL)
{
tptr->prev->next = newnode;
newnode->prev = tptr->prev;
newnode->next = tptr;
tptr->prev = newnode;
}
else
{
tptr->next = newnode;
newnode->prev = tptr;
}
}
}
Error
else
tptr->prev->next = NULL;
free(tptr);
}
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 73/136
6/24/2019 Six Phrase - mySlate
Error
Create
Push
Evaluation
Pop
Create
Push
Evaluation
Pop
Q286. Pushing an element into stack already having ve elements and stack size of 5 , then stack becomes
Over ow
Crash
Under ow
User ow
Q287. In a stack, if a user tries to remove an element from empty stack it is called _________
Under ow
Empty collection
Over ow
Garbage Collection
Q288. Entries in a stack are “ordered”. What is the meaning of this statement?
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 74/136
6/24/2019 Six Phrase - mySlate
Reversing a string
Implementation of recursion
Job scheduling
Q291. Which of the following statement(s) about stack data structure is/are NOT correct?
Null link is present in the last node at the bottom of the stack
Q292. Consider the linked list implementation of a stack. Which of the following node is considered as Top of the stack?
First node
Last node
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 75/136
6/24/2019 Six Phrase - mySlate
Any node
Middle node
Q294. If the elements “A”, “B”, “C” and “D” are placed in a stack and are deleted one at a time, what is the order of removal?
ABCD
DCBA
DCAB
ABDC
Q295. The data structure required to check whether an expression contains balanced parenthesis is?
Stack
Queue
Array
Tree
Queue
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 76/136
6/24/2019 Six Phrase - mySlate
Stack
Array
List
Branch
Tree
Queue
Stack
Q298. The type of expression in which operator succeeds its operands is?
In x Expression
Pre x Expression
Post x Expression
*AB/CD+
AB*CD/+
A*BC+/D
ABCD+/*
xyz*+pq*r+s*+
xyz*+pq*r+s+*
xyz+*pq*r+s*+
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 77/136
6/24/2019 Six Phrase - mySlate
Q301. Convert the following in x expressions into its equivalent post x expressions
(A + B ^D)/(E – F)+G
ABD^+EF–/G+
A B D +^ E F – / G +
A B D ^+ E F/- G +
Q302. Assume that the operators +,-, X are left associative and ^ is right associative.
The order of precedence (from highest to lowest) is ^, X, +, -. The post x expression for the in x expression a + b X c – d ^ e ^ f is
abc X+ def ^^ –
abc X+ de^f^ –
ab+c Xd – e ^f^
-+aXbc^ ^def
Q303. The post x form of the expression (A+ B)*(C*D- E)*F / G is?
AB + CD* E – F **G /
AB + CD* E – *F *G /
AB + CDE * – * F *G /
-/*^ACBDE
-ABCD*^DE
-A/B*C^DE
-A/BC*^DE
+ p-q*rt
– +pqr * t
– +pq * rt
– + * pqrt
600
350
650
588
Q307. Consider the usual implementation of parentheses balancing program using stack. What is the maximum number of parentheses
that will appear on stack at any instance of time during the analysis of ( ( ) ( ( ) ) ( ( ) ) )?
Q308. Let the following circular queue can accommodate maximum six elements with the following data
front = 2 rear = 4
queue = _______; L, M, N, ___, ___
What will happen after ADD O operation takes place?
front = 2 rear = 5
queue = ______; L, M, N, O, ___
front = 3 rear = 5
queue = L, M, N, O, ___
front = 3 rear = 4
queue = ______; L, M, N, O, ___
front = 2 rear = 4
queue = L, M, N, O, ___
Q309. A linear list of elements in which deletion can be done from one end (front) and insertion can take place only at the other end (rear)
is known as a ?
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 79/136
6/24/2019 Six Phrase - mySlate
Queue
Stack
Tree
Linked list
Q310. A queue is a ?
Ordered array
Linear tree
Q311. If the MAX_SIZE is the size of the array used in the implementation of circular queue. How is rear manipulated while inserting an
element in the queue?
rear=(rear%1)+MAX_SIZE
rear=rear%(MAX_SIZE+1)
rear=(rear+1)%MAX_SIZE
rear=rear+(1%MAX_SIZE)
Q312. If the MAX_SIZE is the size of the array used in the implementation of circular queue, array index start with 0, front point to the rst
element in the queue, and rear point to the last element in the queue. Which of the following condition specify that circular queue is
FULL?
Front=rear= -1
Front=(rear+1)%MAX_SIZE
Rear=front+1
Rear=(front+1)%MAX_SIZE
Q313. A circular queue is implemented using an array of size 10. The array index starts with 0, front is 6, and rear is 9. The insertion of
next element takes place at the array index.
0
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 80/136
6/24/2019 Six Phrase - mySlate
10
Q314. If the MAX_SIZE is the size of the array used in the implementation of circular queue, array index start with 0, front point to the rst
element in the queue, and rear point to the last element in the queue. Which of the following condition specify that circular queue is
EMPTY?
Front=rear=0
Front= rear=-1
Front=rear+1
Front=(rear+1)%MAX_SIZE
Q315. A data structure in which elements can be inserted or deleted at/from both the ends but not in the middle is?
Queue
Circular queue
Deque
Priority queue
Q316. In linked list implementation of a queue, front and rear pointers are tracked. Which of these pointers will change during an insertion
into a NONEMPTY queue?
Q317. A normal queue, if implemented using an array of size MAX_SIZE, gets full when
Rear=MAX_SIZE-1
Front=(rear+1)mod MAX_SIZE
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 81/136
6/24/2019 Six Phrase - mySlate
Front=rear+1
Rear=front
Q318. In linked list implementation of a queue, front and rear pointers are tracked. Which of these pointers will change during an insertion
into EMPTY queue?
None
Q319. An array of size MAX_SIZE is used to implement a circular queue. Front, Rear, and count are tracked. Suppose front is 0 and rear is
MAX_SIZE -1. How many elements are present in the queue?
Zero
One
MAX_SIZE-1
MAX_SIZE
Q320.
Suppose a circular queue of capacity (n-1) elements is implemented with an array of n elements. Assume that the insertion and
deletion operations are carried out using REAR and FRONT as array index variables, respectively. Initially REAR=FRONT=0. The
conditions to detect queue full and queue is empty are?
Full: REAR==FRONT
Empty: (REAR+1) mod n==FRONT
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 82/136
6/24/2019 Six Phrase - mySlate
Hierarchical structure
Faster search
Router algorithms
Q322.
In ……………………….. ; for any node n, every descendant node’s value in the left subtree of n is less than the value of n and every
descendant node’s value in the right subtree is greater than the value n.
binary tree
AVL tree
Q323. For nding a node in a …………………, at each stage we ideally reduce the number of nodes we have to check by half.
binary tree
AVL tree
Q324. The height of a BST is given as h. Consider the height of the tree as the no. of edges in the longest path from root to the leaf. The
maximum no. of nodes possible in the tree is?
2^(h-1) -1
2^(h+1) -1.
2^(h +1)
2^(h-1) +1
Q325. In the best case of BST, the time is on the order of ……………………, but in the worst case it requires linear time.
log2n.
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 83/136
6/24/2019 Six Phrase - mySlate
log2(n+1)
n+1
Q326. …………………. of binary search tree starts by visiting the current node, then its left child and then its right child.
Preorder traversal
In-order traversal
Linear traversal
Post-order traversal
Q327. The number of edges from the root to the node is called __________ of the tree.
Height
Depth
Length
Q328. The order with which the nodes are inserted affects the running time of the ……………………. search algorithm.
AVL Tree
Red-Black Tree
Q329. ……………….. of binary search tree starts by visiting the current node’s left child, then its right child and nally the current node itself.
Preorder
In-order
Linear
Post-order
Q330. With an ideal balance, the running time for inserts, searches and deletes, even in the worst case is ………………………
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 84/136
6/24/2019 Six Phrase - mySlate
log2n
log2(n+1)
n+1
Q331. In binary search tree, a …………………… rooted to node n is the tree formed by imaging node n was a root.
cycle
node
root
subtree
Q332. …………………………… is a binary search tree whose left subtree and right subtree differ in height by at most 1 unit and whose left and
right subtrees are themselves AVL trees.
Red-Black Tree
AVL Tree
A-A Tree
Q333. ………………… is a binary search tree whose leaves are external nodes.
Red-Black Tree
AVL Tree
A-A Tree
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 85/136
6/24/2019 Six Phrase - mySlate
i, ii and iv only
Q335.
While inserting into ………………………….., insertions are done at a leaf and will replace an external node with an internal node with two
external children.
red-black tree
AVL tree
Q336. For an AVL tree ………………………….. is the additional piece of information which indicates if the difference in height between the left
and right subtree is the same or if not, which of the two subtrees has height one unit larger.
tree factor
balance factor
additional factor
unit factor
Q337. ………………… is a complete binary tree, that is completely lled except possibly at the bottom level.
Red-Black Tree
AVL Tree
A-A Tree
Q338. In a …………………….. for every node X with a parent P, the key in P is less than or equal to the key in X.
red-black
AVL
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 86/136
6/24/2019 Six Phrase - mySlate
binary search
binary heap
Q339. An insertion into a ……………………….. is performed by inserting the new node in the location referenced by next in the array and then
“sifting it up” by comparing the key of the newly inserted node with the key of the parent.
red-black
AVL
binary search
binary heap
Q340. While deleting nodes from a binary heap, …………………. node is replaced by the last leaf in the tree.
left leaf
right leaf
root
cycle
Q341. In which of the following tree, parent node has a key value greater than or equal to the key value of both of its children?
Max-heap
Q342. A binary search tree is generated by inserting in order the following integers:
50, 15, 62, 5, 20, 58, 91, 3, 8, 37, 60, 24
The number of the node in the left sub-tree and right sub-tree of the root, respectively, is
(4, 7)
(7, 4)
(8, 3)
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 87/136
6/24/2019 Six Phrase - mySlate
(3, 8)
A binary tree, which is completely lled, with the possible exception of the
bottom level, which is lled from right to left
A binary tree, which is completely lled, with the possible exception of the
bottom level, which is lled from left to right
Q345. What is the maximum height of any AVL tree with 7 nodes? Assume that height of tree with single node is 0.
Q346. The height of a tree is the length of the longest root-to-leaf path in it. The maximum and minimum number of nodes in a binary tree
of height 5 are
63 and 6, respectively
64 and 5, respectively
32 and 6, respectively
31 and 5, respectively
Q347. Suppose you are given a binary tree with n nodes, such that each node has exactly either zero or two children. The maximum height
of the tree will be
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 88/136
6/24/2019 Six Phrase - mySlate
n/2-1
n/2+1
(n – 1) / 2
(n + 1) / 2
Q348. The height of a binary tree is the maximum number of edges in any root to leaf path. The maximum number of nodes in a binary
tree of height h is:
2^h-1
2^(h-1) -1
2^(h+1)-1
2*(h+1)
Q349. The number of leaf nodes in a rooted tree of n nodes, with each node having 0 or 3 children is:
n/2
(n-1)/3
(n-1)/2
(2n+1)/3
Q350. Level of a node is distance from root to that node. For example, level of root is 1 and levels of left and right children of root is 2. The
maximum number of nodes on level i of a binary tree is
In the following answers, the operator '^' indicates power.
2^(i)-1
2^i
2^(i+1)
2^[(i+1)/2]
Q351. How will you nd the minimum element in a binary search tree?
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 89/136
6/24/2019 Six Phrase - mySlate
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 90/136
6/24/2019 Six Phrase - mySlate
Q353. The Data structure used in standard implementation of Breadth First Search is?
Stack
Queue
Linked List
Q354. A person wants to visit some places. He starts from a vertex and then wants to visit every place connected to this vertex and so on.
What algorithm he should use?
Trim’s algorithm
Q355.
Given an empty AVL tree, how would you construct AVL tree when a set of numbers are given without performing any rotations?
nd the median of the set of elements given, make it as root and construct
the tree
Q356. In linked list implementation of a queue, from where is the item deleted?
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 91/136
6/24/2019 Six Phrase - mySlate
Q357. Spooling :
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 92/136
6/24/2019 Six Phrase - mySlate
Q1 C.Comments
Solution
No Solution
Q2 C.40
Solution
No Solution
Q3 C.32
Solution
No Solution
Q4 b.35
Solution
No Solution
Q5 d.0 to 1023
Solution
No Solution
Q6 a. a = 10 b = 200
Solution
No Solution
Q7 b. compiler
Solution
No Solution
Q8 d. Boolean
Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 93/136
6/24/2019 Six Phrase - mySlate
No Solution
Q9 d. Stack
Solution
No Solution
Q10 a. -12
Solution
No Solution
Q11 b. Recursion
Solution
No Solution
Q12 a. 50
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 94/136
6/24/2019 Six Phrase - mySlate
No Solution
Q17 b. 40
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q22 d.Statement 4
Solution
No Solution
Q23 b.Statement 2
Solution
No Solution
Q24 a. n equals 1
Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 95/136
6/24/2019 Six Phrase - mySlate
No Solution
Solution
No Solution
Q26 a) -1
Solution
No Solution
Solution
No Solution
Q28 a) A character string containing the name of the le & the second argument is the mode
Solution
No Solution
Q29 c) NULL
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 96/136
6/24/2019 Six Phrase - mySlate
No Solution
Solution
No Solution
Solution
No Solution
Q35 b) False
Solution
No Solution
Q36 a) True
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q39 b) Dimension
Solution
No Solution
Solution
No Solution
Q41 b) 3, 2, 32
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 97/136
6/24/2019 Six Phrase - mySlate
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q46 a) second
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 98/136
6/24/2019 Six Phrase - mySlate
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q53 c) argc – 1
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q56 a)Error
Solution
No Solution
Q57 b) File Name and pointer to rst command line argument supplied.
Solution
No Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 99/136
6/24/2019 Six Phrase - mySlate
Solution
No Solution
Solution
No Solution
Q60 b) o
Solution
No Solution
Q61 a) r
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q64 a) return
Solution
No Solution
Solution
No Solution
Q66 c) double
Solution
No Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 100/136
6/24/2019 Six Phrase - mySlate
Solution
No Solution
Q68 a) hello 5
Solution
No Solution
Q69 a) 5
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q72 d.Error
Solution
No Solution
Solution
No Solution
Q74 a.Decision-Making
Solution
No Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 101/136
6/24/2019 Six Phrase - mySlate
Solution
No Solution
Q76 a.Differ by 80
Solution
No Solution
Solution
No Solution
Q78 b.411
Solution
No Solution
Q79 a.Decision-Making
Solution
No Solution
Solution
No Solution
Q81 a) 0
Solution
No Solution
Q82 a) true
Solution
No Solution
Solution
No Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 102/136
6/24/2019 Six Phrase - mySlate
Q84 a) 9
Solution
No Solution
Q85 d) Within the block it appears & Within the blocks of the block it appears
Solution
No Solution
Q86 a) stack
Solution
No Solution
Q87 c) auto
Solution
No Solution
Q88 a) stack
Solution
No Solution
Solution
No Solution
Q90 b) false
Solution
No Solution
Q91 b) registers
Solution
No Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 103/136
6/24/2019 Six Phrase - mySlate
Solution
No Solution
Q93 b) World
Solution
No Solution
Solution
No Solution
Q95 d) hihello
Solution
No Solution
Q96 a) break
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 104/136
6/24/2019 Six Phrase - mySlate
No Solution
Outside loop
Solution
No Solution
Q102 a) Inside while loop Inside while loop Inside while loop
Solution
No Solution
Solution
No Solution
Q104 b) return
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q108 d) None
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 105/136
6/24/2019 Six Phrase - mySlate
Solution
No Solution
Solution
No Solution
Q110 c) To avoid con icts since library routines use such names
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q113 c) volatile
Solution
No Solution
Q114 d) int
Solution
No Solution
Solution
No Solution
Q116
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 106/136
6/24/2019 Six Phrase - mySlate
c) short is the quali er and int is the basic datatype
Solution
No Solution
Q117 b) -128
Solution
No Solution
Solution
No Solution
Q119 b) struct
Solution
No Solution
Q120 a) 97.000000
Solution
No Solution
Q121 b.By making at least one member function as pure virtual function.
Solution
No Solution
Q122 b.By making at least one member function as pure virtual function.
Solution
No Solution
Solution
No Solution
Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 107/136
6/24/2019 Six Phrase - mySlate
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q128 c.Distributive
Solution
No Solution
Q129 c.Inheritance
Solution
No Solution
Q130 d.Inheritance
Solution
No Solution
Q131 a.extends
Solution
No Solution
Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 108/136
6/24/2019 Six Phrase - mySlate
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q136 c.data in
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q140 b.interrupt
Solution
No Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 109/136
6/24/2019 Six Phrase - mySlate
Q141 b.imperative polymorphism
Solution
No Solution
Q142 b.Overriding
Solution
No Solution
Q143 b.There might be two or more functions with the same name
Solution
No Solution
Q144 d.Heap
Solution
No Solution
Solution
No Solution
Q146 d.*
Solution
No Solution
Solution
No Solution
Q148 b.Operator
Solution
No Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 110/136
6/24/2019 Six Phrase - mySlate
Q149 c.can be both (A) & (B) above
Solution
No Solution
Q150 B) continue
Solution
No Solution
Q151 B) rand()
Solution
No Solution
Q152 B. double
Solution
No Solution
Solution
No Solution
Q154 A) 2 or 4
Solution
No Solution
Q155 B) 20
Solution
No Solution
Q156 A) Error
Solution
No Solution
Q157 D) printf(“%ld\n”,fact(5));
Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 111/136
6/24/2019 Six Phrase - mySlate
No Solution
Q158 A) int
Solution
No Solution
Q159 A) 5
Solution
No Solution
Q160 c) 15
Solution
No Solution
Solution
No Solution
Q162 c) strptr()
Solution
No Solution
Q163 a) and()
Solution
No Solution
Solution
No Solution
Solution
No Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 112/136
6/24/2019 Six Phrase - mySlate
Q166 a) a program allocates memory in heap but forgets to be allocate it
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q169 3. \0
Solution
No Solution
Q170 2. Structure
Solution
No Solution
Solution
No Solution
Q172 a) int
Solution
No Solution
Q173 b) Stack
Solution
No Solution
Q174 d) 5
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 113/136
6/24/2019 Six Phrase - mySlate
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q179 a) Enum
Solution
No Solution
Solution
No Solution
Q181 1. free();
Solution
No Solution
Q182 3. math.h
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 114/136
6/24/2019 Six Phrase - mySlate
Solution
No Solution
Solution
No Solution
Q184 1. (underscore)
Solution
No Solution
Solution
No Solution
Q186 1. hello_World
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q189 C) 1,2,3
Solution
No Solution
Q190
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 115/136
6/24/2019 Six Phrase - mySlate
C) It should be called only within the same source code/program le.
Solution
No Solution
Solution
No Solution
Q192 b) int
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q196 c) free(p);
Solution
No Solution
Solution
No Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 116/136
6/24/2019 Six Phrase - mySlate
Solution
No Solution
Q199 C) strupr
Solution
No Solution
Q200 A) Expanding
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q204 Heaps
Solution
No Solution
Solution
No Solution
Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 117/136
6/24/2019 Six Phrase - mySlate
No Solution
Q207 O(1)
Solution
No Solution
Solution
No Solution
Q209 0, 0.000000
Solution
No Solution
Solution
No Solution
Q211 20
Solution
No Solution
Q212 1
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q215 Error: Declaration syntax error 'v' (or) Size of v is unknown or zero.
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 118/136
6/24/2019 Six Phrase - mySlate
Solution
No Solution
Solution
No Solution
Q217 6.68L
Solution
No Solution
Q218 Stack
Solution
No Solution
Q219 6
Solution
No Solution
Solution
No Solution
Q221 22
Solution
No Solution
Q222 24
Solution
No Solution
Q223 24
Solution
No Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 119/136
6/24/2019 Six Phrase - mySlate
Q224 0011
Solution
No Solution
Q225 36
Solution
No Solution
Q226 (n + 1)/2
Solution
No Solution
Q227 O(n)
Solution
No Solution
Solution
No Solution
Q229 (n+1)/2
Solution
No Solution
Q230 For a serial search to work, the data in the array must be arranged in either alphabetical or numerical order
Solution
No Solution
Q231 binary
Solution
No Solution
Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 120/136
6/24/2019 Six Phrase - mySlate
No Solution
Q233 O(n)
Solution
No Solution
Solution
No Solution
Q235 O(n)
Solution
No Solution
Solution
No Solution
Q237 root
Solution
No Solution
Solution
No Solution
Q239 nodes
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q242 O(1)
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q247 for the size of the structure and the data in the structure are constantly changing.
Solution
No Solution
Solution
No Solution
Solution
No Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 122/136
6/24/2019 Six Phrase - mySlate
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q254 traversal
Solution
No Solution
Solution
No Solution
Q256 Sentinel
Solution
No Solution
Solution
No Solution
Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 123/136
6/24/2019 Six Phrase - mySlate
No Solution
Solution
No Solution
Solution
No Solution
Q261 pointer-variable=(struct-name*)malloc(sizeof(struct-name));
Solution
No Solution
Solution
No Solution
Q263 Dynamic
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 124/136
6/24/2019 Six Phrase - mySlate
Q267 I and III
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q272 135531
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 125/136
6/24/2019 Six Phrase - mySlate
No Solution
Solution
No Solution
Q277 X -> bwd -> fwd = X -> fwd; X -> fwd -> bwd = X -> bwd
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 126/136
6/24/2019 Six Phrase - mySlate
No Solution
Q284 Create
Solution
No Solution
Q285 Pop
Solution
No Solution
Q286 Over ow
Solution
No Solution
Q287 Under ow
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q293 1
Solution
No Solution
Q294 DCBA
Solution
No Solution
Q295 Stack
Solution
No Solution
Q296 Stack
Solution
No Solution
Q297 Stack
Solution
No Solution
Solution
No Solution
Q299 AB*CD/+
Solution
No Solution
Q300 xyz*+pq*r+s*+
Solution
No Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 128/136
6/24/2019 Six Phrase - mySlate
Q301 ABD^+EF–/G+
Solution
No Solution
Solution
No Solution
Q303 AB + CD* E – *F *G /
Solution
No Solution
Q304 -A/B*C^DE
Solution
No Solution
Q305 + p-q*rt
Solution
No Solution
Q306 350
Solution
No Solution
Q307 3
Solution
No Solution
Solution
No Solution
Q309 Queue
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 129/136
6/24/2019 Six Phrase - mySlate
Solution
No Solution
Solution
No Solution
Q311 rear=(rear+1)%MAX_SIZE
Solution
No Solution
Q312 Front=(rear+1)%MAX_SIZE
Solution
No Solution
Q313 0
Solution
No Solution
Solution
No Solution
Q315 Deque
Solution
No Solution
Solution
No Solution
Q317 Rear=MAX_SIZE-1
Solution
No Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 130/136
6/24/2019 Six Phrase - mySlate
Solution
No Solution
Q319 MAX_SIZE
Solution
No Solution
Empty: REAR==FRONT
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q325 log2n.
Solution
No Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 131/136
6/24/2019 Six Phrase - mySlate
Solution
No Solution
Q327 Height
Solution
No Solution
Solution
No Solution
Q329 Post-order
Solution
No Solution
Q330 log2n
Solution
No Solution
Q331 subtree
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 132/136
6/24/2019 Six Phrase - mySlate
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Solution
No Solution
Q340 root
Solution
No Solution
Q341 Max-heap
Solution
No Solution
Q342 (7, 4)
Solution
No Solution
Solution
No Solution
Q344 A binary tree, which is completely lled, with the possible exception of the bottom level, which is lled from left to right
Solution
No Solution
Q345 3
Solution
No Solution
Solution
No Solution
Q347 (n – 1) / 2
Solution
No Solution
Q348 2^(h+1)-1
Solution
No Solution
Q349 (2n+1)/3
Solution
No Solution
Q350 2^(i)-1
Solution
No Solution
while(root.left() != null)
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 134/136
6/24/2019 Six Phrase - mySlate
{
root = root.left();
}
System.out.println(root.data());
Solution
No Solution
inorder(root.left);
System.out.println(root.data);
inorder(root.right);
Solution
No Solution
Q353 Queue
Solution
No Solution
Solution
No Solution
Q355 nd the median of the set of elements given, make it as root and construct the tree
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 135/136
6/24/2019 Six Phrase - mySlate
Solution
No Solution
Solution
No Solution
Solution
No Solution
https://admin.myslate.sixphrase.com/test/preview?test_id=1444a088-f636-4422-8f78-3da9616763a5&branch_id=331ab009-cfbf-44c0-b68b-8d6bc1103e93&isprint=true 136/136