350+ Data Structure CCEE MCQ
350+ Data Structure CCEE MCQ
Sr.No
Project Name YouTube Link
11 Tour and Travel System Project version 3.0 https://youtu.be/Dm7nOdpasWg?si=P_Lh2gcOFhlyudug
12 Gym Management system Project https://youtu.be/J8_7Zrkg7ag?si=LcxV51ynfUB7OptX
13 Online Driving License system Project https://youtu.be/3yRzsMs8TLE?si=JRI_z4FDx4Gmt7fn
14 Online Flight Booking system Project https://youtu.be/m755rOwdk8U?si=HURvAY2VnizIyJlh
15 Employee management system project https://youtu.be/lD1iE3W_GRw?si=Y_jv1xV_BljhrD0H
16 Online student school or college portal https://youtu.be/4A25aEKfei0?si=RoVgZtxMk9TPdQvD
17 Online movie booking system project https://youtu.be/Lfjv_U74SC4?si=fiDvrhhrjb4KSlSm
18 Online Pizza Delivery system project https://youtu.be/Tp3izreZ458?si=8eWAOzA8SVdNwlyM
19 Online Crime Reporting system Project https://youtu.be/0UlzReSk9tQ?si=6vN0e70TVY1GOwPO
20 Online Children Adoption Project https://youtu.be/3T5HC2HKyT4?si=bntP78niYH802I7N
pg. 4 contact us on 8007592194 / 9284926333 www.codewitharrays.in
1. It exports a set of operations
A. true, false
B. false, true
C. true, true
D. false, false
3. Space Complexity iii) Is the strategy guaranteed to find the solution when there in one.
A. true, false
B. false, true
C. false, false
D. true, true
A. true, true
B. false, true
C. false, false
D. true, false
6. To find the predecessor, it is required to traverse the list from the first node in case of singly linked list.
A. i-only
B. ii-only
C. both i and ii
D. none of both
7. Nodes that are not root and not leaf are called as internal nodes.
A. true, true
B. true, false
C. false, true
D. false, false
A. true, true
B. true, false
C. false, true
D. false, false
B. only a and b
A. true, false
B. false, true
C. true, true
D. false, false
C. sometimes more complicated and some other times simpler than that of worst case
D. none or above
D. when item is the last element in the array or is not there at all
13. Which of the following case does not exist in complexity theory
A. best case
B. worst case
C. average case
D. null case
14. The space factor when determining the efficiency of algorithm is measured by
15. The time factor when determining the efficiency of algorithm is measured by
A. counting microseconds
17. Computers are used for processing numerical data called _______ data.
A. float
B. local
C. character
D. non-local
Answer» C. character
discuss
18. Each programming language contains a ______ set that is used to communicate with the computer.
A. character
B. integer
C. float
D. numeric
Answer» A. character
discuss
A. array
B. list
C. string
D. block
Answer» C. string
discuss
A. null
B. binary
C. totalled
D. list
Answer» A. null
discuss
21. A computer which can access an individual byte is called a ________ machine.
A. memory addressable
B. byte addressable
C. bit
D. byte
22. Groups of consecutive elements in a string, such as words, phrases and sentences are called ________.
A. main strings
B. substring
Answer» B. substring
22. Groups of consecutive elements in a string, such as words, phrases and sentences are called ________.
C. index
D. block
Answer» B. substring
discuss
A. length
B. breath
C. width
D. none
Answer» A. length
discuss (1)
24. _________ operation of word processing involves replacing one string in the text by another.
A. insertion
B. deletion
C. searching
D. replacement
Answer» D. replacement
discuss
25. ________ is the problem of deciding whether or not a given String pattern P appears in a text T.
A. pattern matching
B. searching
C. sorting
D. deletion
A. node
B. link
C. variable
D. null
Answer» A. node
discuss
27. Each node in a linear list contains an item called _______ which points to the next node in the list.
A. node
B. link
C. variable
D. null
Answer» B. link
discuss
28. _______ is a variable whose length may vary during the execution, but the length cannot exceed a maximum
values defined before the program is executed.
A. dynamic
B. static
C. semi static
D. global
29. In _______ storage, each cell is divided into two parts---- the path stores a single character, while the second
part contains the address of the cell containing the next character.
A. fixed length
B. linked list
C. variable length
D. sequential
A. insertion
B. deletion
C. concatenation
D. replacement
Answer» C. concatenation
discuss
31. _____ is a variable whose length may vary during the execution of a program.
A. dynamic
B. static
C. semi static
D. global
Answer» A. dynamic
discuss
32. _______ is a structure used to represent the linear relationship between elements by means of sequential
memory locations.
A. linked list
B. array
C. pointer
D. stack
Answer» B. array
discuss
A. linear array
B. pointer
C. linked list
D. tree
34. The number of elements n is called the length or _____ of the array.
A. upper bound
B. lower bound
Answer» C. size
34. The number of elements n is called the length or _____ of the array.
C. size
D. variable
Answer» C. size
discuss
A. size
B. index
C. variable
D. constant
Answer» B. index
discuss
36. Which of the following items are not part of the array declaration?
37. Programming languages like FORTRAN and PASCAL allocate memory space for arrays ______.
A. dynamically
B. statically
C. successively
D. alternatively
Answer» B. statically
discuss
38. The process of accessing and processing each element of an array A, exactly once is called _______.
A. deleting
B. inserting
C. traversing
D. searching
Answer» C. traversing
discuss
39. _________ refers to the operations of rearranging the elements of an array A so that they are in increasing
order.
A. searching
B. sorting
C. traversing
D. inserting
Answer» B. sorting
discuss
A. integer
B. boolean
C. matrix
D. real
Answer» C. matrix
discuss
41. ________ is a list in which the order of the items is significant, and the items are not necessarily sorted.
A. ordered list
B. indexed list
C. sequential list
D. unordered list
42. Representation of a two dimensional as one single column of rows and mapping it sequentially is called
_______ representation.
A. row-major
B. row
C. column-major
D. column
Answer» A. row-major
discuss
43. Matrices with relatively high proportion of zero entries are called ______ matrices.
A. triangular
B. diagonal
C. sparse
D. adjacency
Answer» C. sparse
discuss
44. _______ arrays are where the elements in the different arrays with the same subscript belongs to the same
record.
A. one dimensional
B. parallel
C. two dimensional
D. static
Answer» B. parallel
discuss
A. dynamic
Answer» A. dynamic
45. Records can be stored in an area of memory called _______ memory.
B. static
C. simple
D. parallel
Answer» A. dynamic
discuss
46. A matrix in which non-zero entries can only occur on the diagonal or on elements immediately above or
below the diagonal, is called ______ matrix.
A. triangular
B. tridiagonal
C. sparse
D. simple
Answer» C. sparse
discuss
B. mathematical fuction
C. index
Answer» C. index
discuss
48. Array is a
49. Row -major order in two -dimentional array refers to an arrangement where
A. all elements of a row are stored in memory in sequence followed by next row in sequence,and so on
B. all elements of row are stored in memory in sequence followed by next column in sequence ,and so on
C. all elements of row are stored in memory in sequence followed by next column in sequence
Answer» A. all elements of a row are stored in memory in sequence followed by next row in sequence,and so on
49. Row -major order in two -dimentional array refers to an arrangement where
Answer» A. all elements of a row are stored in memory in sequence followed by next row in sequence,and so on
discuss
50. Array is
C. both a& b
A. m
B. m^2
C. m(m+1)
D. m(m+2)
Answer» D. m(m+2)
discuss
52. let x be the adjacency matrix of a graph .G with no self loop.The entries along the principle diagonal of x
are
A. all "0"
B. all "1"
C. both 0&1
D. different
53. _______ refers to the operation of finding the location of a given item in a collection of items.
A. sorting
B. searching
C. function
D. complexity
Answer» B. searching
discuss
54. _______ is a field whose values uniquely determine the records in the file.
A. pointer
B. primary key
C. secondary key
D. function
A. insertion
Answer» D. deletion
55. By using which of the following methods sorting is not possible?
B. exchange
C. selection
D. deletion
Answer» D. deletion
discuss
A. sequential
B. indexed
C. random
D. bubble
Answer» A. sequential
discuss
A. tree
B. hash table
C. stack
D. graph
58. _________ is a search for data that uses an index to locate the item.
A. binary search
B. sequential search
C. indexed search
D. jump search
59. If the input array is unsorted, then only a linear ______ can be used.
A. binary search
B. sequential search
C. indexed search
D. jump search
60. _______ is a attribute of a sort, indicating that data with equal keys maintain their relative input order in the
output.
A. sort order
B. sort stability
C. sort efficiency
D. collision
61. In ______ method of hashing, selected digit are extracted from the key and used as the address.
A. subtraction
B. digit extraction
C. rotation
D. folding
A. subtraction
B. digit extraction
C. rotation
D. division
Answer» C. rotation
discuss
63. If two different keys yield the same hash address, it is called _______ .
A. binary search
B. sequential search
C. collision
D. rotation
Answer» C. collision
discuss
64. The ______ sort algorithm is called diminishing increment sort.
A. merge
B. radix
C. shell
D. selection
Answer» C. shell
discuss
65. A ______ merge sort uses a constant number of input merge files and the same number of output merge
files.
A. k-way
B. balanced
C. polyphase
D. radix
Answer» B. balanced
discuss
66. ________ method of collision resolution involves maintaining two tables in memory.
A. linear probing
B. chaining
C. quadratic probing
D. double hashing
Answer» B. chaining
discuss
67. _______ is a merge sort that sorts a data stream using repeated merges.
A. balanced
B. polyphase
C. radix
D. k-way
Answer» D. k-way
discuss
A. bubble sort
B. selection sort
C. insertion sort
D. (a),(b),and ©
Answer» D. (a),(b),and ©
discuss
70. Give timing complexities of three sorting algorithms bubble sort,selection sort,insertion sort respectively.
A. n
B. n-1
C. n+2
D. n-2
Answer» B. n-1
discuss
72. Best and the worst case timing complexities of insertion sort are_________.
A. o(n2), o(n2)
C. o(n), o(n2)
D. o(n), o(n3)
A. bubble sort
B. selection sort
C. insertion sort
D. all of them
A. report genration
D. none of these
76. The function islower(char)checks whether a character is in lower case or not.Therefore it should return______
A. 0 or 1
B. -1, 0 or 1
C. a character
D. nothing
Answer» A. 0 or 1
discuss
78. Which of the following data structure can't store the non-homogeneous data element?
A. arrays
B. records
C. pointers
D. none
Answer» A. arrays
discuss
A. an array is suitable for homogeneous data but the data items in a record may have different data type
D. all of above
80. If s1 is "ABC" and s2 is "DEF" then strcat(s1,s2)will give the following result.
A. compilation error
C. 4
D. 2
Answer» C. 4
discuss
82. Where do we use the operator --> ?
C. to access an array
D. both(a) and(b).
A. s1>s2
B. s1=s2
C. s1<s2
Answer» C. s1<s2
discuss
84. Which of the following data structure store the homogeneous data elements?
A. arrays
B. records
C. pointers
D. none
Answer» A. arrays
discuss (1)
85. The number of comparisons required to sort 5 numbers in ascending order using bubble sort are
A. 7
B. 6
C. 10
D. 5
Answer» C. 10
discuss
A. o(2n)
B. o(n3)
C. o(n2)
D. o(2n)
Answer» C. o(n2)
discuss
88. A sorted file contains 16 items. Using binary search, the maximum number of comparisons to search for an
item in this file is
A. 15
B. 8
C. 1
D. 4
Answer» D. 4
discuss
89. A sort which compares adjacent elements in a list and switches where necessary is
A. insertion sort
B. heap sort
C. quick sort
D. bubble sort
90. A sort which iteratively passes through a list to exchange the first element with any element less than it and
then repeats with a new first element is called
A. insertion sort
B. selection sort
C. heap sort
D. quick sort
91. The number of swappings needed to sort the numbers 8, 22, 7, 9, 31, 19, 5, 13 in ascending order, using
bubble sort is
A. 11
B. 12
C. 13
D. 14
Answer» D. 14
discuss
92. A sorting technique that guarantees that records with the same primary key occurs in the same order in the
sorted list as in the original unsorted list is said to be
A. stable
B. consistent
C. external
D. linear
Answer» A. stable
discuss
93. You want to check whether a given set of items is sorted. Which of the following sorting methods will be
most efficient if it is already in sorted order?
A. bubble sort
B. selection sort
C. insertion sort
D. merge sort
94. Which of the following sorting methods will be the best if number of swappings done, is the only measure
of efficienty?
A. bubble sort
B. selection sort
C. insertion sort
D. merge sort
95. You are asked to sort 15 randomly generated numbers. You should prefer
A. bubble sort
B. selection sort
C. insertion sort
D. merge sort
96. What is the number of swaps required to sort n elements using selection sort, in the worst case?
A. Θ(n)
B. Θ(n log n)
C. Θ(n2)
D. Θ(n2 log n)
Answer» A. Θ(n)
discuss
97. The number of interchanges required to sort 5, 1, 6, 2 4 in ascending order using Bubble Sort is
A. 6
B. 5
C. 7
D. 8
Answer» B. 5
discuss
A. lower bound
B. upper bound
C. range
D. extraction
99. Which of the following sorting methods would be most suitable for sorting a list which is almost sorted
A. bubble sort
B. selection sort
C. insertion sort
D. merge sort
A. o(n)
B. o(log n)
C. o(n2)
D. o(n log n)
Answer» C. o(n2)
discuss
101. A sort which compares adjacent elements in a list and switches wherever necessary is _______
A. insertion sort
B. bubble sort
C. selection sort
D. none of these
A. quick sort
B. merge sort
C. bubble sort
D. none of these
103. Consider that n elements are to be sorted.The worst case complexity of bubble sort is____
A. o(1)
B. o(log2n)
C. o(n)
D. o(n2)
Answer» D. o(n2)
discuss
104. In bubble sort,for a file of size n,after p iterations number of records in proper position is____
A. n-p
B. n-p+1
C. n-p+2
D. p
Answer» A. n-p
discuss
105. In bubble sort,for a file of size n,during each pth pass the number of last records left out are____
A. n-p
B. n-p+1
Answer» D. p-1
105. In bubble sort,for a file of size n,during each pth pass the number of last records left out are____
C. p
D. p-1
Answer» D. p-1
discuss (1)
106. Given a file size n the number of times a given file is passed through in bubble sort is____
A. n2
B. n-1
C. nlogn
D. logn
Answer» A. n2
discuss
A. o(nlogn)
B. o(n2)
C. o(n)
D. none of these
Answer» B. o(n2)
discuss
108. A sort which iteratively passes through a list to exchange the first element with any element less than it
and then repeats with a new first element is called
A. insertion sort
B. selection sort
C. bubble sort
D. merge sort
A. interchange
B. searching
C. position adjustment
D. none of these
110. In selection sort of n elements,how many times is the swp function called in the complete execution of the
algorithm?
A. 1
B. n-1
C. n(n-1)/2
D. none of these
Answer» B. n-1
discuss
A. -1
B. 1
C. 0
D. none of these
Answer» C. 0
discuss
A. printf("\\n");
B. printf(\\\n\);
C. echo\\\\n;
D. printf("\\\\n");
Answer» A. printf("\\n");
discuss
113. Following function is used to find the first occurrence of given string in another string
A. strchar
B. strnset
C. strstr
D. strrchr
Answer» D. strrchr
discuss
114. Which of the following is more appropriate for reading a multi_word string?
A. printf
B. scanf
C. put
D. gets
Answer» D. gets
discuss
115. What will be the output of the following code? Int main(){printf("Hello","Word\n");return 0;}
A. hello
B. hello world
C. world
D. none of these
Answer» A. hello
discuss
116. What will be the output of the following code? Int main(){char str[9]="My
Computer";printf("%s\n",str);return 0;}
A. mycompute
B. syntax error
C. runtime error
D. none of these
118. ____operator is used to get the value stored at address stored in pointer variable
A. *
B. &
Answer» A. *
118. ____operator is used to get the value stored at address stored in pointer variable
C. dot
D. +
Answer» A. *
discuss
D. none of these
121. What will be the output of the following code? Void main(){int a=10;int *b=&a;int **c=&b;printf("%d %d
%d",a,*b,**c);}
A. 10 10 garbage
B. 10 garbage garbage
C. 10 10 10
D. syntax error
Answer» C. 10 10 10
discuss
A. array
B. structure
C. string
Answer» B. structure
discuss
A. another structure
B. array
C. function
D. none of these
Answer» C. function
discuss
A. dot operator
C. both a and b
D. none of these
127. How many bits are absolutely necessary to store an ASCII character ?
A. 7
Answer» A. 7
127. How many bits are absolutely necessary to store an ASCII character ?
B. 8
C. 15
D. 16
Answer» A. 7
discuss
A. 0001 1111
B. 1111 0001
C. 0001 0000
D. none of these
A. 0001 1111
B. 1111 0001
C. 0000 1000
D. none of these
A. 0101 1001
B. 1010 0100
C. 0000 0010
D. none of these
A. 0101 1001
B. 1010 0100
C. 0000 0010
D. none of these
A. 0101 1100
B. 0110 1000
C. 0001 1110
D. none of these
A. 0101 1100
B. 0010 1110
C. 0000 0110
D. none of these
A. <<
B. >>
C. &
D. /
Answer» A. <<
discuss
A. 320
B. 1
C. 64
Answer» C. 64
discuss
137. What will be output if you will compile and execute the following c code? #include<stdio.h>
#define x 5+2
int main(){
int i;
i=x*x*x;
printf("%d",i); return 0;
}
A. 343
B. 27
C. 133
D. compiler error
Answer» B. 27
discuss
138. What will be output if you will compile and execute the following c code? #include<stdio.h>
int main(){
char c=125;
c=c+10;
printf("%d",c); return 0;
}
A. 135
B. +inf
C. -121
D. -8
Answer» C. -121
discuss
139. What will be output if you will compile and execute the following c code? #include<stdio.h> int main(){
float a=5.2;
if(a==5.2)
printf("Equal");
else if(a<5.2)
printf("Less than");
else
printf("Greater than"); return 0;
}
A. equal
B. less than
C. greater than
D. compiler error
140. What will be output if you will compile and execute the following c code? #include<stdio.h>
int main(){
int i=4,x;
x=++i + ++i + ++i;
printf("%d",x); return 0;
}
A. 21
B. 18
C. 12
D. compiler error
Answer» A. 21
discuss
141. What will be output if you will compile and execute the following c code? #include<stdio.h>
int main(){
int a=2;
if(a==2){
a=~a+2<<1;
printf("%d",a);
}
else{
break;
} return 0;
}
B. -3
C. -2
D. compiler error
142. What will be output if you will compile and execute the following c code? #include<stdio.h>
int main(){
int a=10;
printf("%d %d %d",a,a++,++a); return 0;
}
A. 12 11 11
B. 12 10 10
C. 11 11 12
D. 10 10 12
Answer» A. 12 11 11
discuss
143. What will be output if you will compile and execute the following c code? #include<stdio.h>
int main(){
char *str="Hello world";
printf("%d",printf("%s",str)); return 0;
}
A. 10hello world
B. 11hello world
C. hello world12
D. hello world13
144. What will be output if you will compile and execute the following c code?
#include <stdio.h>
#include <string.h>
int main(){
char *str=NULL;
strcpy(str,"cquestionbank");
printf("%s",str); return 0;
}
A. cquestionbank
B. cquestionbank\\0
C. (null)
Answer» C. (null)
discuss
A. 0 1 2 3
B. 0 1 2
C. 1 2 3
D. compiler error
Answer» C. 1 2 3
discuss (1)
146. What will be output if you will compile and execute the following c code? #include<stdio.h>
int main(){
int x;
for(x=1;x<=5;x++);
printf("%d",x); return 0;
}
A. 4
B. 5
Answer» C. 6
146. What will be output if you will compile and execute the following c code? #include<stdio.h>
int main(){
int x;
for(x=1;x<=5;x++);
printf("%d",x); return 0;
}
C. 6
D. compiler error
Answer» C. 6
discuss
147. What will be output if you will compile and execute the following c code? #include<stdio.h>
int main(){
printf("%d",sizeof(5.2)); return 0;
}
A. 2
B. 4
C. 8
D. 10
Answer» C. 8
discuss
148. What will be output if you will compile and execute the following c code?
#include <stdio.h>
#include <string.h>
int main(){
char c='\08';
printf("%d",c); return 0;
}
A. 8
B. \8\
C. 9
D. compiler error
A. 35
B. 510
C. 15
D. 40
Answer» D. 40
discuss
150. What will be output if you will compile and execute the following c code? #include<stdio.h>
int * call();
int main(){ int *ptr;
ptr=call();
printf("%d",*ptr); return 0;
} int * call(){
int a=25;
a++;
return &a;
}
A. 25
B. 26
C. any adress
D. garbage value
152. What will be output if you will compile and execute the following c code? #include<stdio.h> int main(){
int array[]={10,20,30,40};
printf("%d",-2[array]); return 0;
}
A. -60
B. -30
C. 60
D. garbage value
Answer» B. -30
discuss
153. What will be output if you will compile and execute the following c code? #include<stdio.h>
int main(){
int i=10;
static int x=i;
if(x==i)
printf("Equal");
else if(x>i)
printf("Greater than");
else
printf("Less than"); return 0;
}
A. equal
B. less than
C. greater than
154. What will be output if you will compile and execute the following c code? #include<stdio.h>
#define max 5;
int main(){
int i=0;
i=max++;
printf("%d",i++); return 0;
}
A. 5
B. 6
C. 7
D. 0
Answer» D. 0
discuss
155. What will be output if you will compile and execute the following c code? #include<stdio.h>
int main(){
double far* p,q;
printf("%d",sizeof(p)+sizeof q); return 0; }
A. 12
B. 8
C. 4
D. 1
Answer» A. 12
discuss
A. abacus
B. charles babage
C. thomson
D. dennis ritchie
A. class
B. structure
158. A variable which is visible only in the function in which it is defined, is called
A. static
B. auto
C. external
D. local
Answer» D. local
discuss
A. two bytes
B. four bytes
C. one bytes
D. eight bytes
A. strings
B. lists
C. queues
161. In C, if you pass an array as an argument to a function, what actually gets passed?
162. Which data structure allows deleting data elements from front and inserting at rear?
A. stack
B. queue
C. dequeue
Answer» B. queue
discuss
A. fifo
B. lifo
C. lilo
D. liso
Answer» A. fifo
discuss
A. lifo
B. fifo
C. lilo
D. lito
Answer» A. lifo
discuss
A. three fields
B. two fields
C. four fields
D. one field
A. f(n) x g(n)
B. max ( f(n),g(n))
C. min (f(n),g(n))
D. f(n) + g(n)
B. optimality
C. seaching
168. Consider that n elements are to be sorted. What is the worst case time complexity of Bubble sort?
A. o(1)
B. o(log2n)
C. o(n)
D. o(n^2)
Answer» D. o(n^2)
discuss
A. o(n)
B. o(log n)
C. o(n2)
D. o(n log n)
Answer» B. o(log n)
discuss
A. o(n)
B. o(log n)
Answer» A. o(n)
170. The complexity of linear search algorithm is
C. o(n2)
D. o(n log n)
Answer» A. o(n)
discuss
A. trees
B. graphs
C. arrays
D. none of above
Answer» C. arrays
discuss
A. two
B. eight
C. twenty
D. theoratically no limit. the only practical limits are memory size and compilers
Answer» D. theoratically no limit. the only practical limits are memory size and compilers
discuss
B. has a declaration
D. all of these
A. unsigned character
B. unsigned integer
C. character
D. all of these
176. Which of the following 'C' type is not a primitive data structure?
A. int
B. float
C. char
D. none of these
A. 263
D. garbage
A. local variables
B. internal variables
C. external variable
D. global variables
A. stack
B. queue
C. array
Answer» A. stack
discuss
182. What will be the output of the program? #include<stdio.h>
int main()
{
int X=40;
{
int X=20;
printf("%d ", X);
}
printf("%d\n", X);
return 0;
}
A. 40 40
B. 20 20
C. 20
D. error
Answer» D. error
discuss
183. What additional requirement is placed on an array, so that binary search may be used to locate an entry?
C. queues use two ends of the structure; stacks use only one.
D. stacks use two ends of the structure, queues use only one.
Answer» C. queues use two ends of the structure; stacks use only one.
discuss
185. If the characters 'D', 'C', 'B', 'A' are placed in a queue (in that order), and then removed one at a time, in
what order will they be removed?
A. abcd
Answer» D. dcba
185. If the characters 'D', 'C', 'B', 'A' are placed in a queue (in that order), and then removed one at a time, in
what order will they be removed?
B. abdc
C. dcab
D. dcba
Answer» D. dcba
discuss
186. Which of the following formulas in big-O notation best represent the expression n²+35n+6?
A. o(n³)
B. o(n²)
C. o(n)
D. o(42)
Answer» B. o(n²)
discuss
A. constant
B. linear
C. logarithmic
D. quadratic
Answer» B. linear
discuss
188. The keyword used to transfer control from a function back to the calling function is
A. switch
B. goto
C. go back
D. return
Answer» D. return
discuss
189. How many times the program will print "Amrutvahini" ? #include<stdio.h>
int main()
{
printf("Amrutvahini");
main();
return 0;
}
A. infinite times
B. 32767 times
C. 65535 times
int main()
{
while(i)
{
fun();
main();
}
printf("Hello\n");
return 0;
}
int fun()
{
printf("Hi");
}
A. hello
B. hi hello
C. no output
D. infinite loop
Answer» A. hello
discuss
191. In a linked list, the pointer of the last node contains a special value, called the ______ pointer.
A. null
B. zero
C. link
D. next pointer
Answer» A. null
discuss
192. In a ________ linked list, the last node's link field points to the first node of the list.
A. circularly
B. linearly
C. sequentially
D. indexed
Answer» A. circularly
discuss
193. The second part of the node, is called _______ field, and contains the address of the next node in the list.
A. pointer
B. field
C. node
D. link
Answer» D. link
discuss
194. The link list also contains a list pointer variable called start or ________.
A. name
B. field
C. node
D. link
Answer» A. name
discuss
195. A ________ linked list is a linked list structure in which each node has a pointer to both its successor and
predecessor.
A. circularly
B. doubly
Answer» B. doubly
195. A ________ linked list is a linked list structure in which each node has a pointer to both its successor and
predecessor.
C. linear
D. sequential
Answer» B. doubly
discuss
196. _______ list is a special list that is maintained, which consists of unused memory cells.
A. linear
B. doubly linked
C. circularly linked
D. free storage
197. _______ is a technique using which a computer periodically collects all the deleted space onto the free
storage list.
A. garbage collection
B. garbage compaction
C. linked list
D. free storage
198. _______ attacks the problem of fragmentation by moving all the allocated blocks to one end of memory,
thus combining all the holes.
A. underflow
B. overflow
C. compaction
D. free storage
Answer» B. overflow
discuss
199. A ________ linked list is a linked list which always contains a special node, called the header node.
A. circular
B. grounded
C. header
Answer» C. header
199. A ________ linked list is a linked list which always contains a special node, called the header node.
D. doubly
Answer» C. header
discuss
200. A polynomial can be represented in a _______ by just storing the coefficient and exponent of each term.
A. array
B. linked list
C. queue
D. stack
A. free storage
B. underflow
C. overflow
D. compaction
Answer» B. underflow
discuss
202. ________ is an organization that provides faster request and return time response.
A. stack
B. queue
C. buddy system
D. recursion
203. _______ attacks the problem of fragmentation by moving all the allocated blocks to one end of memory,
thus combining all the holes.
A. garbage collection
B. garbage compaction
C. buddy system
D. queue
204. A _______ list structure can be traversed in two directions-- in the forward direction from beginning of the
list to end, or in the backward direction, from the end of the list to the beginning.
A. one way
B. linear array
C. two way
D. header
A. one way
C. two way
D. header
210. Because of linear structure of linked list having linear ordering,there is similarity between linked list and
array in
A. insertion of a node
B. deletion of a node
B. in any order
A. a stack
B. a queue
C. a tree
D. both a and b
213. To insert a node in a circular list at rear end it should be inserted at …...of the queue
A. front position
B. front-1position
C. rear position
D. rear-1 position
A. no pointer
B. 1 pointer
C. 2 pointer
D. 3 pointer
Answer» B. 1 pointer
discuss
A. it is a linked structure,where each data gives the address of the next data
Answer» A. it is a linked structure,where each data gives the address of the next data
discuss
A. data field
C. both (a)and(b)
D. only b
A. first node
B. middle node
C. last node
A. underflow
B. overflow
Answer» A. underflow
218. Deletion of a node from an empty linked list will cause________
Answer» A. underflow
discuss
A. 1
B. 2
C. 3
D. 4
Answer» B. 2
discuss
A. 1
B. 2
C. 3
D. 4
Answer» A. 1
discuss
A. 0(n)
B. 0(1)
C. 0(n2)
D. 0(log n)
Answer» A. 0(n)
discuss
C. both (a)and(b)
D. none of these
A. 0(n)
B. 0(log n)
C. 0(n2)
D. 0(n log n)
Answer» A. 0(n)
discuss
A. 0(n)
B. 0(log n)
C. o(n2)
D. 0(n log n)
Answer» A. 0(n)
discuss
225. Time required to delete a node with given address in a linked list is____
A. 0(n)
B. 0(log n)
C. 0(1)
D. 0(n log n)
Answer» A. 0(n)
discuss
226. Select the set of instructions to insert a node pointed by q after a node pointed by p
A. q->next=p->next; p->next=q;
B. p->next=q; q->next=p->next
C. both (a)and(b)
D. none of these
227. select the set of operations to insert a node pointed by q at the beginning of the linked list
A. q->next=head; head=q;
B. head=q;q ->next=head;
C. both (a)and(b)
D. none of these
228. Select the set of operations to delete the first node from a linked list
A. p=head;head=head->next;free(p);
B. free(head)
C. head=head->next;p=head;free(p)
D. none of these
Answer» A. p=head;head=head->next;free(p);
discuss
229. Select the correct looping condition for positioning apointer p on the second last in a linked list.Assume
p=head,initially.
A. p->next->next!=null
B. p->next=null
C. p!=null
D. none of these
Answer» A. p->next->next!=null
discuss
230. If address of the 8th element in a linked list of integers is1022,then address of the 9th element is
A. 1024
B. 1026
C. 1023
D. unknown
Answer» D. unknown
discuss
231. The advantages of linked list over an array for representing a list is________
B. deletion is easier
C. insertion is easier
D. none of these
B. calloc
C. both (a)and(b)
D. none of these
C. both (a)and(b)
D. only(a)but not(b)
A. singly
B. singly circular
C. doublyly
D. none of these
Answer» C. doublyly
discuss
A. an array of structure
C. gll
A. pointer to predecessor
B. pointer to sucessor
C. both (a)and(b)
D. only(a)
238. Each node in a linear list contains an item called____which points to the next node in the list.
A. node
B. link
C. variable
D. null
Answer» B. link
discuss
B. calloc
C. alloc
D. free
Answer» C. alloc
discuss
240. The function that allocates requested size of bytes and returns a pointer to the first byte of the allocated
space is
A. realloc
B. malloc
C. free
Answer» B. malloc
240. The function that allocates requested size of bytes and returns a pointer to the first byte of the allocated
space is
D. none of these
Answer» B. malloc
discuss
D. none of these
243. A linear collection of data elements where the linear node is given by means of pointer is called?
A. linked list
B. node list
C. primitive list
D. none
244. Which of the following operations is performed more efficiently by doubly linked list than by singly linked
list?
A. i and ii
B. i and iii
D. i,ii and iv
246. 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?
A. i and ii
B. i and iii
D. i,ii and iv
247. Consider an implementation of unsorted doubly linked list. Suppose it has its representation with a head
pointer and tail pointer. Given the representation, which of the following operation can be implemented in
O(1) time?
A. i and ii
B. i and iii
D. i,ii,iii and iv
248. In linked list each node contain minimum of two fields. One field is data field to store the data second
field is?
A. pointer to character
B. pointer to integer
C. pointer to node
D. node
249. What would be the asymptotic time complexity to add a node at the end of singly linked list, if the pointer
is initially pointing to the head of the list?
A. o(1)
B. o(n)
C. θ (n)
D. θ (1)
Answer» C. θ (n)
discuss
250. What would be the asymptotic time complexity to add an element in the linked list?
A. o(1)
B. o(n)
C. o(n2)
D. none
Answer» B. o(n)
discuss
251. What would be the asymptotic time complexity to find an element in the linked list?
A. o(1)
B. o(n)
C. o(n2)
D. none
Answer» B. o(n)
discuss
252. What would be the asymptotic time complexity to insert an element at the second position in the linked
list?
A. o(1)
B. o(n)
C. o(n2)
D. none
Answer» A. o(1)
discuss
253. The concatenation of two list can performed in O(1) time. Which of the following variation of linked list
can be used?
struct node
{
int data;
struct node * next;
}
typedef struct node NODE;
NODE *ptr;
Answer» A. ptr=(node*)malloc(sizeof(node));
A. ptr=(node*)malloc(sizeof(node));
B. ptr=(node*)malloc(node);
C. ptr=(node*)malloc(sizeof(node*));
D. ptr=(node)malloc(sizeof(node));
Answer» A. ptr=(node*)malloc(sizeof(node));
discuss
255. A variant of linked list in which last node of the list points to the first node of the list is?
C. in both directions
D. none
257. What kind of linked list is best to answer question like “What is the item at position n?”
258. A variation of linked list is circular linked list, in which the last node in the list points to first node of the
list. One problem with this type of list is?
it waste memory space since the pointer head already points to the first node and thus the list node does not need to point
A.
to the first node.
Answer» C. it is difficult to traverse the list as the pointer of the last node is now not null
258. A variation of linked list is circular linked list, in which the last node in the list points to first node of the
list. One problem with this type of list is?
C. it is difficult to traverse the list as the pointer of the last node is now not null
D. all of above
Answer» C. it is difficult to traverse the list as the pointer of the last node is now not null
discuss
259. A variant of the linked list in which none of the node contains NULL pointer is?
D. none
A. one pointer
B. two pointer
C. three pointer
D. none
261. Which of the following statements about linked list data structure is/are TRUE?
A. addition and deletion of an item to/ from the linked list require modification of the existing pointers
B. the linked list pointers do not provide an efficient way to search an item in the linked list
D. the linked list data structure provides an efficient way to find kth element in the list
Answer» B. the linked list pointers do not provide an efficient way to search an item in the linked list
discuss
262. Linked lists are not suitable to for the implementation of?
A. insertion sort
B. radix sort
C. polynomial manipulation
D. binary search
263. In worst case, the number of comparison need to search a singly linked list of length n for a given element
is
A. log n
B. n/2
C. log2n-1
D. n
Answer» D. n
discuss
struct item
{
int data;
struct item * next;
};
int f (struct item *p)
{
return((p==NULL) ||((p->next==NULL)||(p->data<=p->next->data) && (p->next)));
}
B. the element in the list are sorted in non-decreasing order of data value
C. the element in the list are sorted in non-increasing order of data value
D. not all element in the list have the same data value
Answer» B. the element in the list are sorted in non-decreasing order of data value
discuss
A. array
B. list
C. string
D. block
Answer» C. string
discuss
266. String with zero characters is called____string
A. null
B. binary
C. totalled
D. list
Answer» A. null
discuss
267. Groups of consecutive element in a string.Such as words,phrase and sentences are called___
A. main string
B. substring
C. index
D. block
Answer» B. substring
discuss
268. _____operation of word processing invovles replacing one string in the text by another.
A. insertion
B. deletion is easier
C. searching
D. replacement
Answer» D. replacement
discuss
269. _____is the problem of deciding whether or not a given string problem p appears in a text T.
A. pattern matching
B. searching
C. sorting
D. deletion
A. insertion
B. deletion
Answer» C. concatenation
270. If string1=john,and string2=Rivers are merged,the process is called
C. concatenation
D. replacement
Answer» C. concatenation
discuss
271. ____is a variable whose length may vary during the execution of a program.
A. dynamic
B. static
C. semistatistic
D. global
Answer» A. dynamic
discuss
273. If a function is declared as void fn(int *p), then which of the following statements is valid to call function
fn?
274. To declare an array S that holds a 5-character string, you would write
A. char s[5]
B. char s[6]
C. string s[5]
D. stringchar s[5]
A. string
B. array
C. structure
D. pointer
Answer» C. structure
discuss
A. template
B. member
C. both 1 & 2
D. none of these
Answer» A. template
discuss
277. If a, b and c are integer variables with the values a=8, b=3 and c=-5. Then what is the value of the
arithmetic expression: 2 * b + 3 * (a-c)
A. 15
B. 6
C. -16
D. -1
Answer» A. 15
discuss
A. library function
C. header
D. statement
280. While incrementing a pointer, its value gets increased by the length of the data type to which it points.
This length is called
A. scale factor
B. length factor
C. pointer factor
D. increment factor
A. library function
B. directive
C. recursive function
D. none of above
C. to access an array
D. both(a) and(b).
285. In selection sort of n elements,how many times is the swap function called in the complete execution of
the algorithm?
A. 1
B. n-1
C. n(n-1)/2
D. none of these
Answer» B. n-1
discuss
A. string
B. string constant
C. character
D. alphabet
288. Each data item in a record may be a group item composed of sub-items; those items which are
indecomposable are called
A. Elementary items
B. Atoms
C. Scalars
D. All of above
B. Data elements in linked list need not be stored in adjacent space in memory
D. Linked lists are collection of the nodes that contain information part and next pointer
C. Pointer array
291. When new data are to be inserted into a data structure, but there is no available space; this situation is
usually called
A. Housefull
B. Saturated
C. Underflow
D. Overflow
Answer» D. Overflow
discuss
292. The situation when in a linked list START=NULL is
A. Underflow
B. Overflow
C. Housefull
D. Saturated
Answer» A. Underflow
discuss
D. None of above
A. FIFO lists
B. LIFO list
C. Piles
D. Push-down lists
295. In a binary tree, certain null entries are re- placed by special pointers which point to nodes higher in tree
for efficiency. These special pointers are called
A. Leaf
B. Branch
C. Path
D. Thread
Answer» D. Thread
discuss
D. none is true
A. Isolated
B. Complete
C. Finite
D. Strongly connected
Answer» B. Complete
discuss
299. The Worst case occur in linear search algo- rithm when
D. None of above
Answer» C. Item is the last element in the array or is not there at all
discuss
C. Sometimes more complicated and some other times simpler than that of worst case
302. The following data structure allows deleting data elements from front and inserting at rear
A. Stacks
B. Queues
C. Deques
Answer» B. Queues
discuss
303. This data structure allows deletions at both ends of the list but insertion at only one end.
A. Input-restricted deque
B. Output-restricted deque
C. Priority queues
A. Strings
B. Lists
C. Stacks
A. Strings
B. Lists
C. Queues
306. To represent hierarchical relationship be- tween elements, the following data structure is not suitable
A. Deque
B. Priority
C. Tree
D. All of above
Answer» C. Tree
discuss
307. A binary tree whose every node has either zero or two children is called
D. None of above
A. Dn = n log2n
B. Dn = n log2n+1
C. Dn = log2n
D. Dn = log2n+1
Answer» D. Dn = log2n+1
discuss
A. O(n)
B. O(log )
C. O(n log n)
Answer» B. O(log )
discuss
310. The complexity of Bubble sort algorithm is
A. O(n)
B. O (n2)
C. O(n log n)
Answer» B. O (n2)
discuss
311. When in order traversing a tree resulted E A C K F H D B G; the preorder traversal would return
A. FAEKCDBHG
B. FAEKCDHGB
C. EAFKHDCBG
D. FEAKDCHBG
Answer» B. FAEKCDHGB
discuss
312. When representing any algebraic expression E the following uses only binary operations in a 2-tree
A. the variable in E will appear as external nodes and operations in internal nodes
B. the operations in E will appear as exter- nal nodes and variables in internal nodes
Answer» A. the variable in E will appear as external nodes and operations in internal nodes
discuss
313. When converting binary tree into extended binary tree, all the original nodes in binary tree are
314. The post order traversal of a binary tree is DEBFCA. Find out the pre order traversal
A. ABFCDE
B. ADBFEC
C. ABDECF
Answer» C. ABDECF
314. The post order traversal of a binary tree is DEBFCA. Find out the pre order traversal
Answer» C. ABDECF
discuss
315. Which of the following data structure is lin- ear data structure?
A. Trees
B. Graphs
C. Arrays
Answer» C. Arrays
discuss
A. Merging
B. Inserting
C. Traversal
Answer» C. Traversal
discuss
317. Finding the location of the element with a given value is called
A. Traversal
B. Search
C. Sort
Answer» B. Search
discuss
B. the size of the structure and the data in the structure are constantly changing
B. the size of the structure and the data in the structure are constantly changing
Answer» B. the size of the structure and the data in the structure are constantly changing
discuss
320. Each array declaration need not give, implicitly or explicitly, the information about the
A. name of array
A. O(n)
B. O(log n)
C. O(n log n)
D. None of these
322. The indirect change of the values of a vari- able in one module by another module is called
A. internal change
B. inter-module change
C. side effect
324. The time factor when determining the effi- ciency of algorithm is measured by
325. The space factor when determining the effi- ciency of algorithm is measured by
326. All the above* Which of the following data structures are indexed structures
A. linear arrays
B. linked lists
C. both of above
D. none of above
327. Which of the following is not the required condition for binary search algorithm
C. there should be the direct access to the middle element in any sublist
A. binary search algorithm is not efficient when the data elements are more than 1000.
C. requirement of sorted array is expen- sive when a lot of insertion and dele- tions are needed
Answer» A. binary search algorithm is not efficient when the data elements are more than 1000.
discuss
A. tables arrays
B. matrix arrays
A. Array
B. Lists
C. stacks
D. all of above
Answer» C. stacks
discuss
331. A data structure where elements can be added or removed at either end but not in the middle is referred
as
A. Linked lists
B. Stacks
C. Queues
D. Deque
Answer» D. Deque
discuss
332. The following sorting algorithm is of divide- and-conquer type
A. Bubble sort
B. Insertion sort
C. Quick sort
Bubble sort and insertion sort are both comparison-based sorting algorithms, but they do not use the divide-and-conquer
approach. Bubble sort works by repeatedly swapping adjacent elements that are out of order, while insertion sort works by
iteratively inserting each element into its correct position in the sorted list. Both of these algorithms have a time complexity of
O(n^2) in the worst case.
discuss (1)
A. Recursion
B. Polish notation
C. Traversal algorithm
Answer» A. Recursion
discuss
334. The elements of an array are stored suc- cessively in memory cells because
by this way computer can keep track only the address of the first element and the addresses of other elements can be
A.
calculated
B. the architecture of computer memory does not allow arrays to store other than serially
Answer» A. by this way computer can keep track only the address of the first element and the addresses of other elements can
be calculated
discuss
A. base address
B. floor address
C. foundation address
D. first address
336. The memory address of fifth element of an array can be calculated by the formula
A. LOC(Array[5])=Base(Array[5])+(5-lower boun(D), where w is the number of words per memory cell for the array
B. LOC(Array[5])=Base(Array[4])+(5-Upper boun(D), where w is the number of words per memory cell for the array
C. LOC(Array[5]=Base(Array)+w(5-lower bou
D. , where w is the number of words per memory cell for the array
337. The following data structure can’t store the non-homogeneous data elements
A. Arrays
B. Records
C. Pointers
Answer» A. Arrays
discuss
338. The in order traversal of tree will yield a sorted listing of elements of tree in
A. Binary trees
C. Heaps
D. None of above
A. every value in left sub tree and smaller than right sub tree
A. endpoints of e
B. adjacent nodes
C. neighbors
A. tree graph
B. free tree
C. tree
A. An array is suitable for homogeneous data but hte data items in a record may have different data type
D. All of above
343. The following data structure store the ho- mogeneous data elements
A. Arrays
B. Records
C. Pointers
Answer» A. Arrays
discuss
344. Which of the following data structure is not linear data structure?
A. Arrays
B. Linked lists
D. None is true
https://www.instagram.com/codewitharrays/
https://codewitharrays.in/project