Explore topic-wise MCQs in Computer Science Engineering (CSE).

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.

201.

Which nodes contains a null pointer in a linked list?

A. first node
B. middle node
C. last node
D. both (a) and (b)
Answer» D. both (a) and (b)
202.

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» B. 6
203.

Which sorting algorithm can exploit the partially sorted data in a list?

A. bubble sort
B. selection sort
C. insertion sort
D. all of them
Answer» D. all of them
204.

The result of 0001 1010 & 0000 1000 is ___

A. 0001 1111
B. 1111 0001
C. 0000 1000
D. none of these
Answer» D. none of these
205.

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
D. none of the above
Answer» B. all elements of row are stored in memory in sequence followed by next column in sequence ,and so on
206.

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
Answer» C. queue
207.

The function strcmp(s1,s2)will return -1 if____

A. s1>s2
B. s1=s2
C. s1<s2
D. function does not return -1.
Answer» D. function does not return -1.
208.

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» C. 7
209.

Stack is a -------------List.

A. lifo
B. fifo
C. lilo
D. lito
Answer» B. fifo
210.

What will be output if you will compile and execute the following c code? #includeint 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» B. 12 10 10
211.

____operator is used to get the value stored at address stored in pointer variable

A. *
B. &
C. dot
D. +
Answer» B. &
212.

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
Answer» B. linked lists
213.

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» D. All of above
214.

Best and the worst case timing complexities of insertion sort are_________.

A. o(n2), o(n2)
B. o(n log n), o(n2)
C. o(n), o(n2)
D. o(n), o(n3)
Answer» D. o(n), o(n3)
215.

The selection sort is basically a method of repeated

A. interchange
B. searching
C. position adjustment
D. none of these
Answer» D. none of these
216.

_______ 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
Answer» B. garbage compaction
217.

What will be output if you will compile and execute the following c code? #include int main(){float a=5.2;if(a==5.2)printf("Equal");else if(a

A. equal
B. less than
C. greater than
D. compiler error
Answer» C. greater than
218.

The complexity of Bubble sort algorithm is

A. o(n)
B. o(log n)
C. o(n2)
D. o(n log n)
Answer» D. o(n log n)
219.

The following data structure allows deleting data elements from front and inserting at rear

A. Stacks
B. Queues
C. Deques
D. Binary search tree
Answer» C. Deques
220.

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» E.
221.

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» B. consistent
222.

Which of the following best describes sorting ?

A. accessing and processing each record exactly once
B. finding the location of the record with a given key
C. arranging the data (record) in some given order
D. adding a new record to the data structure
Answer» D. adding a new record to the data structure
223.

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» E.
224.

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
D. all the above
Answer» D. all the above
225.

Which of the following is not a limitation ofbinary search algorithm ?

A. binary search algorithm is not efficient when the data elements are more than 1000.
B. must use a sorted array
C. requirement of sorted array is expen- sive when a lot of insertion and dele- tions are needed
D. there must be a mechanism to access middle element directly
Answer» B. must use a sorted array
226.

_______ 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
Answer» C. buddy system
227.

Consider an implementation of unsorted singly linked list. Suppose it has its representation with a head and tail pointer. Given the representation, which of the following operation can be implemented in O(1) time? i) Insertion at the front of the linked listii) Insertion at the end of the linked listiii) Deletion of the front node of the linked listiv) Deletion of the last node of the linked lis

A. i and ii
B. i and iii
C. i,ii and iii
D. i,ii and iv
Answer» D. i,ii and iv
228.

The worst case occures in linear search algorithms when

A. item is somewhere in the middle of the array
B. item is not there in the array at all
C. item is last element in the array
D. item is last element in the array or is not there at all.
Answer» E.
229.

_______ 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
Answer» E.
230.

Which of the following is not the required condition for binary search algorithm

A. there must be mechanism to delete and/ or insert elements in list
B. the list must be sorted
C. there should be the direct access to the middle element in any sublist
D. none of the above
Answer» B. the list must be sorted
231.

Sorting is useful for_________

A. report genration
B. minimizing the storage needed
C. making searching easier and efficient
D. responding to queries easily
Answer» D. responding to queries easily
232.

A function which calls itself is called as

A. library function
B. directive
C. recursive function
D. none of above
Answer» D. none of above
233.

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» E.
234.

Which of the following data structure can't store the non-homogeneous data element?

A. arrays
B. records
C. pointers
D. none
Answer» B. records
235.

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
Answer» E.
236.

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» E.
237.

The Average case occur in linear search al- gorithm

A. When Item is somewhere in the middle of the array
B. When Item is not in the array at all
C. When Item is the last element in the ar- ray
D. All the above
Answer» B. When Item is not in the array at all
238.

The complexity of the average case of analgorithm is

A. Much more complicated to analyze than that of worst case
B. Much more simpler to analyze than that of worst case
C. Sometimes more complicated and some other times simpler than that of worst case
D. None of the above
Answer» B. Much more simpler to analyze than that of worst case
239.

C language was invented by

A. abacus
B. charles babage
C. thomson
D. dennis ritchie
Answer» E.
240.

_________ 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» C. traversing
241.

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
Answer» C. rotation
242.

One of the statement is false

A. tree is an abstract data type
B. array is a linear data structure
C. typedef is derived data type
D. float is built in data type
Answer» D. float is built in data type
243.

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» C. o(n)
244.

The getch() library function returns___

A. a character when any key is pressed
B. a character when enter is pressed
C. displays a character on the screen when any key is pressed
D. none of these
Answer» B. a character when enter is pressed
245.

Which of the following statement is true about char ****a ?

A. a is pointer to a pointer to a pointer to char
B. a is pointer to a pointer to a pointer to char
C. a is a pointer to a char pointer
D. a is a pointer to a pointer to a char
Answer» C. a is a pointer to a char pointer
246.

If string1=john,and string2=Rivers are merged,the process is called

A. insertion
B. deletion
C. concatenation
D. replacement
Answer» D. replacement
247.

Examples of sorting algorithms are

A. bubble sort
B. selection sort
C. insertion sort
D. (a),(b),and ©
Answer» E.
248.

What additional requirement is placed on an array, so that binary search may be used to locate an entry?

A. the array elements must form a heap
B. the array must have at least 2 entries.
C. the array must be sorted.
D. the array\s size must be a power of two.
Answer» D. the array\s size must be a power of two.
249.

A structure definition is called as

A. template
B. member
C. both 1 & 2
D. none of these
Answer» B. member
250.

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» B. row