Computer/Data Structures and algorithms MCQ Questions Sample Test,Sample questions

Question:
 In linear search algorithm the Worst case occurs when

1. The item is somewhere in the middle of the array

2.The item is not in the array at all

3.The item is the last element in the array

4.The item is the last element in the array or is not there at all


Question:
A data structure where elements can be added or removed at either end but not in the middle

1.Linked lists

2.Stacks

3.Queues

4.Deque


Question:
A variable P is called pointer if

1.P contains the address of an element in DATA.

2.P points to the address of first element in DATA

3.P can store only memory addresses

4.P contain the DATA and the address of DATA


Question:
Arrays are best data structures

1.for relatively permanent collections of data

2.for the size of the structure and the data in the structure are constantly changing

3.for both of above situation

4.for none of above situation


Question:
Binary search algorithm can not be applied to

1.sorted linked list

2.sorted binary trees

3.sorted linear array

4.pointer array


Question:
Each array declaration need not give implicitly or explicitly the information about

1. the name of array

2.the data type of array

3. the first data from the set to be stored

4.the index set of the array


Question:
Each data item in a record may be a group item composed of sub-items; those items which are indecomposable are called

1.elementary items

2. atoms

3.scalars

4.all of above


Question:
Finding the location of the element with a given value is

1.Traversal

2.Search

3.Sort

4.None of above


Question:
For an algorithm the complexity of the average case is

1.Much more complicated to analyze than that of worst case

2.Much more simpler to analyze than that of worst case

3. Sometimes more complicated and some other times simpler than that of worst case

4.None or above


Question:
he Average case occur in linear search algorithm

1.When Item is somewhere in the middle of the array

2. When Item is not in the array at all

3.When Item is the last element in the array

4.When Item is the last element in the array or is not there at all


Question:
If the values of a variable in one module is indirectly changed by another module this situation is called

1. internal change

2. inter-module change

3. side effect

4.side-module update


Question:
When determining the efficiency of algorithm the space factor is measured by

1.Counting the maximum memory needed by the algorithm

2.Counting the minimum memory needed by the algorithm

3.Counting the average memory needed by the algorithm

4.Counting the maximum disk space needed by the algorithm


Question:
Linked lists are best suited

1.for relatively permanent collections of data

2. for the size of the structure and the data in the structure are constantly changing

3.for both of above situation

4.for none of above situation


Question:
The complexity of Binary search algorithm is

1.O(n)

2.O(log)

3.O(n2)

4.O(n log n)


Question:
The complexity of Bubble sort algorithm 

1. O(n)

2.O(log n)

3.O(n2)

4.O(n log n)


Question:
The complexity of linear search algorithm is

1.O(n)

2.O(log n)

3.O(n2)

4. O(n log n)


Question:
The complexity of linear search algorithm is

1.O(n)

2.O(log n)

3.O(n2)

4. O(n log n)


Question:
The difference between linear array and a record is

1.An array is suitable for homogeneous data but the data items in a record may have different data type

2.In a record there may not be a natural ordering in opposed to linear array.

3. A record form a hierarchical structure but a linear array does not

4.All of above


Question:
The elements of an array are stored successively in memory cells because

1.by this way computer can keep track only the address of the first element and the addresses of other elements can be calculated

2.the architecture of computer memory does not allow arrays to store other than serially

3.both of above

4.none of above


Question:
The memory address of fifth element of an array can be calculated by the formula

1.LOC(Array[5]=Base(Array)+w(5-lower bound) where w is the number of words per memory cell for the array

2.LOC(Array[5])=Base(Array[5])+(5-lower bound) where w is the number of words per memory cell for the array

3.LOC(Array[5])=Base(Array[4])+(5-Upper bound) where w is the number of words per memory cell for the array

4.None of above


Question:
The memory address of the first element of an array is called

1.floor address

2.foundation address

3.first address

4.base address


Question:
The operation of processing each element in the list is known as

1.Sorting

2.Merging

3.Inserting

4.Traversal


Question:
The situation when in a linked list START=NULL is

1.underflow

2.overflow

3.housefull

4.saturated


Question:
The term “push” and “pop” is related to the 

1.array

2.lists

3.stacks

4.all of above


Question:
Two dimensional arrays are also called

1.tables arrays

2.matrix arrays

3.both of above

4.none of above


Question:
Two main measures for the efficiency of an algorithm are

1.Processor and memory

2.Complexity and capacity

3. Time and space

4. Data and space


Question:
When determining the efficiency of algorithm the time factor is measured by 

1.Counting microseconds

2.Counting the number of key operations

3.Counting the number of statements

4.Counting the kilobytes of algorithm


Question:
When inorder traversing a tree resulted E A C K F H D B G; the preorder traversal would return

1.FAEKCDBHG

2.FAEKCDHGB

3.EAFKHDCBG

4.FEAKDCHBG


Question:
When new data are to be inserted into a data structure but there is no available space; this situation is usually called

1.underflow

2.overflow

3.housefull

4.saturated


Question:
Which of the following case does not exist in complexity theory

1.Best case

2.Worst case

3.Average case

4.Null case


Question:
Which of the following data structure can’t store the non-homogeneous data elements?

1. Arrays

2.Records

3.Pointers

4.None


Question:
Which of the following data structure is linear data structure?

1.Trees

2.Graphs

3.Arrays

4. None of above


Question:
Which of the following data structure is not linear data structure?

1.Arrays

2.Linked lists

3.both of above

4.none of above


Question:
Which of the following data structure store the homogeneous data elements?

1. Arrays

2.Records

3.Pointers

4.None


Question:
Which of the following data structures are indexed structures?

1.linear arrays

2.linked lists

3.both of above

4. none of above


Question:
Which of the following is not a limitation of binary search algorithm?

1.must use a sorted array

2.requirement of sorted array is expensive when a lot of insertion and deletions are needed

3.there must be a mechanism to access middle element directly

4.binary search algorithm is not efficient when the data elements are more than 1000.


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

1.The list must be sorted

2. there should be the direct access to the middle element in any sublist

3. There must be mechanism to delete and/or insert elements in list

4.none of above


Question:
Which of the following is two way list?

1.grounded header list

2.circular header list

3. linked list with header and trailer nodes

4. none of above


Question:
Which of the following name does not relate to stacks?

1. FIFO lists

2.LIFO list

3.Piles

4.Push-down lists


Question:
Which of the following statement is false?

1.Arrays are dense lists and static data structure

2.data elements in linked list need not be stored in adjacent space in memory

3.pointers store the next data element of a list

4. linked lists are collection of the nodes that contain information part and next poin


More MCQS

  1. Computer fundamentals
  2. Computer Basic MCQS
  3. CCC MCQ Sample Paper 1
  4. CCC Exams MCQS Sample Paper Test 2
  5. Computer Basics MCQS Paper 1
  6. Computer Basics MCQS Paper 2
  7. FUNDAMENTALS OF COMPUTERS MCQs PART 2
  8. FUNDAMENTALS OF COMPUTERS MCQs PART 1
  9. FUNDAMENTALS OF COMPUTERS MCQs PART 3
  10. Computer mcqs smaple paper 1
  11. Computer mcqs smaple paper 2
  12. Computer mcqs smaple paper 3
  13. Fundamentals of Computers
  14. Fundamentals of Computers (New) Part 1
  15. Fundamentals of Computers (New) Part 2
  16. Computer Networks MCQ Questions
  17. Computer Networks Transition from IPV4 to IPV6
  18. Computer Fundamentals (New) Part 1
  19. Computer Fundamentals (New) Part 2
  20. Computer Fundamentals (New) Part 3
  21. Computer Fundamentals (New) Part 4
  22. Computer Fundamentals (New) Part 5
  23. Computer Fundamentals (New) Part 6
  24. Computer Fundamentals (New) Part 7
  25. Computer Fundamentals (New) Part 8
  26. Operating Systems MCQs Part 1
  27. Operating Systems MCQs Part 2
  28. OS(Computer Operating Systems) Part 1
  29. OS(Computer Operating Systems) Part 2
  30. OS(Computer Operating Systems) Part 3
  31. OS(Computer Operating Systems) Part 4
  32. OS - Computer Operating Systems Part 5
  33. OS - Computer Operating Systems Part 6
  34. OS - Computer Operating Systems Part 7
  35. MS Word MCQ Questions Part 1
  36. MS Word MCQ Questions Part 2
  37. MS Word MCQ Questions Part 3
  38. MS Word MCQ Questions Part 4
  39. MS Word MCQ Questions Part 5
  40. MS Word MCQ Questions Part 7
  41. MS Word MCQ Questions Part 6
  42. Microsoft Excel MCQ Questions Part 1
  43. Microsoft Excel MCQ Questions Part 2
  44. Microsoft Excel MCQ Questions Part 3
  45. Microsoft Excel MCQ Questions Part 4
  46. Microsoft Excel MCQ Questions Part 5
  47. Microsoft Excel MCQ Questions Part 6
  48. Microsoft Excel MCQ Questions Part 7
  49. MS PowerPoint MCQ Questions PART 1
  50. MS PowerPoint MCQ Questions PART 2
  51. MS PowerPoint MCQ Questions PART 3
  52. MS PowerPoint MCQ Questions PART 4
  53. MS PowerPoint MCQ Questions PART 5
  54. MS PowerPoint MCQ Questions PART 6
  55. MS PowerPoint MCQ Questions PART 7
  56. MS Access MCQ Questions Part 1
  57. MS Access MCQ Questions Part 2
  58. MS Access MCQ Questions Part 3
  59. MS Access MCQ Questions Part 4
  60. MS Access MCQ Questions Part 5
  61. MS Access MCQ Questions Part 6
  62. MS Access MCQ Questions Part 7
  63. MS Access MCQ Questions Part 8
  64. Query of MS Access MCQS Part 1
  65. Query of MS Access MCQS Part 2
  66. Data Structures and algorithms MCQ Questions
  67. Computer Communication and Networking Quiz
  68. Computer Graphics MCQ Quiz Questions and Answers
  69. Computer Basics Quiz Questions
  70. Computer Quiz Questions with Answers
  71. Computer Hardware MCQS Quiz
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!