MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Generally ____ is used to store large amount of data.
A
array
B
linked list
C
both a and b
D
none of above
Explanation: 

Detailed explanation-1: -For most applications linked lists can store any type of data as a value, such as: integers, strings and booleans. Note that it isn’t necessary to store the value itself in a node, depending on the application, a reference (such as a variable) could be stored instead.

Detailed explanation-2: -Linked list is a linear data structure, meaning that one data point follows another. It’s a list of values that could be stored at non-contiguous locations in memory, called nodes, connected by links. Each node contains data and a pointer to the next node. Unlike arrays, linked lists don’t allow random access.

Detailed explanation-3: -Why Linked List is implemented on Heap memory rather than Stack memory? The Linked List is a linear data structure, in which the elements are not stored at contiguous memory locations. The elements in a linked list are linked using pointers. It is implemented on the heap memory rather than the stack memory.

Detailed explanation-4: -Which among the following data structures is best suited for storing very large numbers (numbers that cannot be stored in long long int). Following are the operations needed for these large numbers. Explanation: The only two choices that make sense are Array and Linked List.

There is 1 question to complete.