Data Structures Practice Questions and Answers

The Free download links of Data Structures Practice Questions and Answers Papers enclosed below. Candidates who are going to start their preparation for the Data Structures Practice papers can use these links. Download the Data Structures Practice Papers PDF along with the Answers. Data Structures Practice Papers are updated here. A vast number of applicants are browsing on the Internet for the Data Structures Practice Question Papers & Syllabus. For those candidates, here we are providing the links for Data Structures Practice Papers. Improve your knowledge by referring the Data Structures Practice Question papers.

Data Structures Practice Questions and Answers

Practice Questions and Answers on Data Structures

1. Sorting data means to arrange it in __________ order.
(a) Alphabetical
(b) Numerical
(c) either alphabetical or numerical
(d) none of above

2. Data sorted from the largest value to the smallest value is sorted in
(a) Ascending
(b) Descending
(c) Randomly
(d) none of the above

3. If the binary search algorithm determines that the search argument is in the upper half of the array, which of the following statements will set the appropriate variable to the appropriate value?
(a) start Sub = middle Sub-1;
(b) start Sub = middle Sub + 1;
(c) stop Sub = middle Sub-1;
(d) stop Sub middle Sub + 1;

4. Which of the following statements is used in the binary search algorithm to halve the array ?
(a) middle Sub = (start Sub + stop Sub)/2;
(b) middle Sub = start Sub + stop Sub/2;
(c) middle Sub = middle Sub/2;
(d) middle Sub = (stop Sub – start Sub)/2;

5. The __________ sort algorithm works by comparing adjacent array elements and swapping the ones that are out of order.
(a) Alphabetic
(b) Bubble
(c) Compare
(d) list

6. When you use the bubble sort, the Tow first step in swapping two of the elements in the salary array is to
(a) assign salary [X] to temp
(b) assign salary [X + 2] to temp
(c) assign salary [X] to salary [X + 1]
(d) assign temp to salary [X].

7. The process of arranging data in alphabetical or numerical order is called
(a) Sorting
(b) Searching
(c) Traversal
(d) Merging.

8. A _________ search begins the search with the first array element.
(a) Serial
(b) Random
(c) Parallel
(d) binary

9. The data for which you are searching is called the
(a) search argument
(b) sorting argument
(c) deletion argument
(d) binary argument.

10. The _____________ sort divides the array into sorted and unsorted sublists.
(a) Selection
(b) Bubble
(c) Insertion
(d) all of the above

11. Which of the following is an output postfix notation of (A – B)* (C/D) + E?
(a) AB-CD/* E+
(b) AB-CDE/* +
(c) ABCDE-I* E+
(d) ABCDE+*/-.

12. Which of the following is an output postfix notation of (A + B) * C/D + E↑F/G?
(a) AB* + CD/ + EF↑/G
(b) AB+ C* D/EF↑ + G/
(c) AB* + CID + EF↑ G
(d) AB+ C* D/EFG ↑ +/

13. Which of the following is an postfix notation of NOT A OR NOT B NOT C
(a) A NOT B NOT C NOT
(b) A NOT B NOT C NOT AND OR
(c) A NOT B NOT C NOT OR
(d) ABC NOT

14. A postfix expression is merely the reverse of the prefix expression.
(a) True
(b) False

15. A stack may be used to aid in evaluating a prefix expression.
(a) True
(b) False

16. Which of the following applications is suitable for a FIFO queue ?
(a) An inventory of parts is to be processed by part number
(b) A dictionary of words used by a spelling checker is to be created
(c) A program to solve a maze is to backtrack to an earlier position when a dead-end position is reached
(d) A program is to keep track of patients as they check into a clinic, assigning them to doctors on a first-come, first-served basis.

17. The number of nodes in a full binary tree of depth 4 is
(a) 15
(b) 16
(c) 14
(d) 13

18. If the binary search algorithm determines that the argument is in the lower half of the array, which of the following statements ill set the appropriate variable to the appropriate value?
(a) start Sub= middle Sub-1;
(b) start Sub = middle Sub + 1;
(c) stop Sub= middle Sub-1;
(d) stop Sub= middle Sub + 1.

19. Which of the following is false?
(a) A binary search begins with the middle element in the array
(b) A binary search continues halving the array either until a match is found or until there are no more elements to search
(c) If the search argument is greater than the value located in the middle of the array, the binary search in continues in the lower half of the array
(d) For a binary search to work, the data ad in the array must be arranged in either alphabetical or numerical order.

20. When you use the bubble sort, the first step in swapping two of the elements in the code array is to
(a) assign code [x + 2] to temp
(b) assign code [x] to temp
(c) assign code [x] to code [x + 1]
(d) assign temp to code [x]. d

21. A(n) ____________ occurs when the value in the current record’s control field does not match the value in the control variable.
(a) control break
(b) error
(c) unable to find
(d) return’s zero.

22. The bubble sort would compare the code [x] element to the ____________ element.
(a) code [x + 1]
(b) code [x + 2]
(c) code [x + 2x]
(d) all of the above

23. Which of the following types of programs would require the program data to be sorted in order for the programs to work correctly?
(a) programs that display department names in alphabetical order
(b) programs that display sales amounts in numerical order
(c) programs that display subtotals in reports
(d) all of the above.

24. Parenthesis are never needed in prefix or postfix expressions.
(a) True
(b) False.

25. The relative order of the operators in an in fix expression is exactly the reverse of the order of the operators in the equivalent postfix expression.
(a) True
(b) False

26. The value for which you are searching is called the
(a) binary value
(b) key
(c) search argument
(d) serial value

27. Which of the following is false?
(a) A serial search begins with the first array element
(b) A serial search continues searching, element by element, either until a match is found or until the end of the array is encountered
(c) A serial search is useful when the amount of data that must be searched is small
(d) For a serial search to work, the data in the array must be arranged in either alphabetical or numerical order.

28. _______ which are calculated by adding together the various subtotals in the report, typically appear at the end of the report.
(a) grand total
(b) final totals
(c) summary totals
(d) all of the above.

29. A __________ search begins the search with the element that is located in the middle of the array.
(a) Serial
(b) Random
(c) Parallel
(d) binary

30. Which is true about linked list?
(a) A list is a dynamic data structure
(b) A list is a static data structure having variable storage
(c) A stack can’t be implemented by a linear linked list
(d) Both (a) and (b) above

31. The address field of a linked list
(a) Contain address of the next node
(b) Contain address of the next pointer
(c) May contain NULL character
(d) Both (a) and (c) above.

32. A circular list can be used to represent
(a) A stack
(b) A queue
(c) B-tree
(d) Both (a) and (b) above

33. Given expression is A + B * C. After being postorder traversal this will become
(a) ABC*+
(b) AB+ C*
(c) *+ ABC
(d) + A* BC.

34. Binary expression tree is traversed in _______ traversal.
(a) Preorder
(b) Postorder
(c) Inorder
(d) Both (a) and (b) above

35. Given in fix expression is (A + B)* (C-D). Its postfix expression will be
(a) AB+CD-*
(b) *+ AB-CD
(c) + AB*- CD
(d) ABCD-+*

36. Breadth-first traversal (BFS) is method
(a) to traverse all successors of a visited node before any successors of any of those successors
(b) to traverse a single path of the graph as far it can go
(c) to traverse the graph using shortest path
(d) none of the above.

37. BFS is implementing using
(a) Queue
(b) Kruska’s Algorithm
(c) Warshall’s Algorithm
(d) None of the above.

38. If a binary tree traversed in inorder then numbers of the node are printed in__________ order.
(a) Ascending order
(b) Descending order
(c) Randomly
(d) none of the above

39. A list node representing an are of a graph requires how many fields ?
(a) 3
(b) 2
(c) 4
(d) 1

40. Its appropriate to represent a queue as
(a) a circular list
(b) doubly linked list
(c) linear linked list
(d) Array

41. Given two statements
(1) Insertion of an element should be done at the last node in a circular list
(2) Deletion of an element should be done at the last node of the circular list.
(a) Both are True
(b) Both are False
(c) First is true and second is false
(d) First is false and second is true.

42. To insert a node in a circular list at rear position, it should be inserted at ___________ of the queue
(a) Front position
(b) Front-1 position
(c) Rear position
(d) Rear-1 position.

43. To free which of the following list traversing through the entire list is not necessary.
(a) Circular list
(b) Singly linked list
(c) Double linked list
(d) Both (b) and (c) above

44. A Header node to represent a graph node requires how many fields ?
(a) 3
(b) 2
(c) 4
(d) 5

45. Traversing a binary tree first root and then left and right subtrees called _________ traversal.
(a) Postorder
(b) Preorder
(c) Inorder
(d) None of the above

46. Identify the true statements regarding insertion of node in a linear linked list.
(i) Setting the field of the new node means allocating memory to newly created node
(ii) If the node precedes all others in the list, then insert it at the front and return its address
(iii) Creating a new node depends upon free memory space
(iv) The node number where insertion to be taken place, must be known prior to the insertion.
(a) (i), (ii) and (iii)
(b) (ii), (iii) and (iv)
(c) (i) and (ii)
(d) (ii) and (iii)

47. Which of the following languages is more suited to a structured program
(a) Assembly
(b) FORTRAN
(c) PL/I
(d) BASIC

48. Which of the following languages is the most widely used ?
(a) BASIC
(b) PASCAL
(c) PL/I
(d) FORTRAN

49. Which of the following languages was developed first?
(a) PASCAL
(b) BASIC
(c) COBOL
(d) FORTRAN

50. High Level Languages:
(a) are very difficult to learn
(b) are designed to be used by a specific computer manufacturer
(c) opened up computers to more people
(d) none of the above

51. How many Divisions are there in COBOL programme :
(a) Three
(b) Five
(c) Two
(d) Four

52. The first Division in a COBOL programming is:
(a) Environment Division
(b) Data Division
(c) Identification Division
(d) Algol Division

53. In the Environment Division, how many sections are there :
(a) Three
(b) One
(c) Four
(d) Two

54. Working-Storage section is included under which of the following Divisions :
(a) Data Division
(b) Identification Division
(c) Enviroment Division
(d) Algol Division

55. Which one of the following characters indicates the position of an assumed decimal point in a COBOL programme:
(a) P
(b) V
(c) S
(d) A

56. What is the name given to the first generation computer languages ?
(a) Binary languages
(b) Machine languages
(c) Primary languages
(d) Assembly languages

57. Can you name the most primitive computer programming language?
(a) Machine language
(b) 4GL
(c) Assembly language
(d) High level language.

58. As compared to natural languages like English or Tamil, most of the programming languages are easier to
(a) Use
(b) Interpret
(c) Learn
(d) teach

59. An instruction that can be recognized and used without translation must be written in
(a) BASIC
(b) Machine code
(c) Assembly code
(d) Source code

60. What is the name of the language which consists of strings of 1s and 0s and is the only one which the computer can understand directly?
(a) Assembly language
(b) High level language
(c) higher level language
(d) machine language

61. The only language which is machine specific and which a computer understands directly is called
(a) assembly language
(b) lower level language
(c) high level languages
(d) Machine language

62. Compilers and interpreters are themselves
(a) high level language
(b) programs
(c) codes
(d) mnemonics

63. What is the name of the output from either a compiler or an assembler ?
(a) Source code
(b) Object code
(c) Operand
(d) Op-code

64. Whereas a high level language could remain the same from one computer to another, each computer requires its own
(a) Compiler
(b) Keyboard
(c) Monitor
(d) assembler

65. What is the name of computer programming language which is widely used in computer science and engineering as well as business?
(a) PASCAL
(b) LISP
(c) COBOL
(d) BASIC

66. Which programming language is associated with Admiral Grace Hopper?
(a) C
(b) COBOL
(c) LISP
(d) BASIC