MCQOPTIONS
Saved Bookmarks
This section includes 282 Mcqs, each offering curated multiple-choice questions to sharpen your Computer Science Engineering (CSE) knowledge and support exam preparation. Choose a topic below to get started.
| 151. |
Finite sequence S of Zero or more chatacters is called_____ |
| A. | array |
| B. | list |
| C. | string |
| D. | block |
| Answer» D. block | |
| 152. |
A node of linked list contains_______ |
| A. | data field |
| B. | a self referential pointer |
| C. | both (a)and(b) |
| D. | only b |
| Answer» D. only b | |
| 153. |
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» E. | |
| 154. |
________ is a linearly ordered sequence of memory cells. |
| A. | node |
| B. | link |
| C. | variable |
| Answer» B. link | |
| 155. |
Accessing time of nth node in a linked list is______ |
| A. | 0(n) |
| B. | 0(1) |
| C. | 0(n2) |
| D. | 0(log n) |
| Answer» B. 0(1) | |
| 156. |
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 |
| C. | p |
| D. | p-1 |
| Answer» E. | |
| 157. |
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 |
| Answer» B. head=q;q ->next=head; | |
| 158. |
A circular list can be used to represent |
| A. | a stack |
| B. | a queue |
| C. | a tree |
| D. | both a and b |
| Answer» E. | |
| 159. |
The post order traversal of a binary tree is DEBFCA. Find out the pre order traversal |
| A. | ABFCDE |
| B. | ADBFEC |
| C. | ABDECF |
| D. | None of the above |
| Answer» D. None of the above | |
| 160. |
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» C. n(n-1)/2 | |
| 161. |
Pointer is a___________ |
| A. | a keyword used to create a variable |
| B. | a variable that stores the address of some instruction |
| C. | a variable that stores the address of some other variable |
| D. | all of the above |
| Answer» D. all of the above | |
| 162. |
Are *ptr++ and ++*ptr are same? |
| A. | no they are not same |
| B. | yes they are one and the same |
| C. | depends upon the value of ptr |
| D. | none of these |
| Answer» B. yes they are one and the same | |
| 163. |
_______ refers to situation where one wants to delete data form a data structure that is empty. |
| A. | free storage |
| B. | underflow |
| C. | overflow |
| D. | compaction |
| Answer» C. overflow | |
| 164. |
Which of the following can not be a structure member? |
| A. | another structure |
| B. | array |
| C. | function |
| D. | none of these |
| Answer» D. none of these | |
| 165. |
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» C. index | |
| 166. |
The number of elements n is called the length or _____ of the array. |
| A. | upper bound |
| B. | lower bound |
| C. | size |
| D. | variable |
| Answer» D. variable | |
| 167. |
Which of the following sorting method is the slowest? |
| A. | quick sort |
| B. | merge sort |
| C. | bubble sort |
| D. | none of these |
| Answer» D. none of these | |
| 168. |
What will be output if you will compile and execute the following c code? #includeint main(){int i=4,x;x=++i + ++i + ++i;printf("%d",x); return 0;} |
| A. | 21 |
| B. | 18 |
| C. | 12 |
| D. | compiler error |
| Answer» B. 18 | |
| 169. |
the terms push and pop are related to |
| A. | stack |
| B. | queue |
| C. | array |
| D. | none of the above |
| Answer» B. queue | |
| 170. |
What will be the output of the program? #includeint 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» E. | |
| 171. |
Following function is used to find the first occurrence of given string in another string |
| A. | strchar |
| B. | strnset |
| C. | strstr |
| D. | strrchr |
| Answer» E. | |
| 172. |
The following data structure is non-linear type |
| A. | Strings |
| B. | Lists |
| C. | Stacks |
| D. | None of the above |
| Answer» E. | |
| 173. |
What will be output if you will compile and execute the following c code? #includeint main(){int i=10;static int x=i;if(x==i)printf("Equal");else if(x>i)printf("Greater than");elseprintf("Less than"); return 0;} |
| A. | equal |
| B. | less than |
| C. | greater than |
| D. | compiler error |
| Answer» E. | |
| 174. |
_______ 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» C. two dimensional | |
| 175. |
Deletion in a linked list requeries modification of______pointers |
| A. | 1 |
| B. | 2 |
| C. | 3 |
| D. | 4 |
| Answer» B. 2 | |
| 176. |
The constructed datatype in C is known as |
| A. | string |
| B. | array |
| C. | structure |
| D. | pointer |
| Answer» D. pointer | |
| 177. |
Searching of linked list requires linked list to be created |
| A. | in stored order only |
| B. | in any order |
| C. | without underflow condition |
| D. | none of the above |
| Answer» C. without underflow condition | |
| 178. |
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 |
| Answer» C. bubble sort | |
| 179. |
The following data structure is linear type |
| A. | Strings |
| B. | Lists |
| C. | Queues |
| D. | All of the above |
| Answer» E. | |
| 180. |
A binary tree whose every node has either zero or two children is called |
| A. | Complete binary tree |
| B. | Binary search tree |
| C. | Extended binary tree |
| D. | None of above |
| Answer» D. None of above | |
| 181. |
The most significant bit is lost in following operation |
| A. | << |
| B. | >> |
| C. | & |
| D. | / |
| Answer» B. >> | |
| 182. |
_____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 |
| Answer» B. searching | |
| 183. |
Binary search algorithm cannot be applied to |
| A. | Sorted binary trees |
| B. | Sorted linear array |
| C. | Pointer array |
| D. | Sorted linked list |
| Answer» E. | |
| 184. |
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» B. hello world | |
| 185. |
By using which of the following methods sorting is not possible? |
| A. | insertion |
| B. | exchange |
| C. | selection |
| D. | deletion |
| Answer» E. | |
| 186. |
The elements of an array are stored suc- cessively in memory cells because |
| A. | by this way computer can keep track only the address of the first element and the addresses of other elements can be calculated |
| B. | the architecture of computer memory does not allow arrays to store other than serially |
| C. | A and B both false |
| D. | A and B both true |
| Answer» B. the architecture of computer memory does not allow arrays to store other than serially | |
| 187. |
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 |
| D. | none of these |
| Answer» C. free | |
| 188. |
Time required to search an element in a sorted linked list is______ |
| A. | 0(n) |
| B. | 0(log n) |
| C. | o(n2) |
| D. | 0(n log n) |
| Answer» B. 0(log n) | |
| 189. |
The ______ sort algorithm is called diminishing increment sort. |
| A. | merge |
| B. | radix |
| C. | shell |
| D. | selection |
| Answer» D. selection | |
| 190. |
_______ 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 |
| Answer» C. sort efficiency | |
| 191. |
_____passes are required to sort n data using bubble sort. |
| A. | n |
| B. | n-1 |
| C. | n+2 |
| D. | n-2 |
| Answer» C. n+2 | |
| 192. |
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» E. | |
| 193. |
Which of the following data structure is linear type ? |
| A. | strings |
| B. | lists |
| C. | queues |
| D. | all of the above |
| Answer» E. | |
| 194. |
What term is used to describe an O(n) algorithm |
| A. | constant |
| B. | linear |
| C. | logarithmic |
| D. | quadratic |
| Answer» C. logarithmic | |
| 195. |
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» E. | |
| 196. |
The in order traversal of tree will yield a sorted listing of elements of tree in |
| A. | Binary trees |
| B. | Binary search trees |
| C. | Heaps |
| D. | None of above |
| Answer» C. Heaps | |
| 197. |
The following name does not relate to stacks |
| A. | FIFO lists |
| B. | LIFO list |
| C. | Piles |
| D. | Push-down lists |
| Answer» B. LIFO list | |
| 198. |
consider the function f defined here:struct item{int data;struct item * next;};int f (struct item *p){return((p==NULL) ||((p->next==NULL)||(p->datanext->data) && (p->next)));}For a given linked list p, the function f returns 1 if and only if |
| A. | the list is empty or has exactly one element |
| 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» C. the element in the list are sorted in non-increasing order of data value | |
| 199. |
Which of the following is a collection of different data type elements? |
| A. | array |
| B. | structure |
| C. | string |
| D. | all of the above |
| Answer» C. string | |
| 200. |
Insertion in a linked list requires modification of____pointers |
| A. | 1 |
| B. | 2 |
| C. | 3 |
| D. | 4 |
| Answer» C. 3 | |