Data Structures & Database Systems
Data Structures & Database Systems
_______ is useful when data are stored and then retrieved in reverse order.
a) queue b) stack c) linked list d) None of these
Answer:b
A ___________ is an ordered list in which all insertions and deletions are made at one end.
a) linked list b) stack c) queue d) graph
Answer:b
Static arrays are structures whose size is fixed at ____
a) Compile time b) run time c) real time d) fixed time
Answer:a
A linked list is a collection of______
a) Data b) List c) Object d) Class
Answer:d
A singly linked list as described above provides access to the list from the ____
a) Head node b) base node c) tree node d) real node
Answer:a
A doubly linked list is a list that has ____ references
a) one b) two c) three d) four
Answer:b
Traversing a linked list is important for many ___
a) Applications b) collections c) references d) accesses
Answer:a
A tree data structure can be defined as _____
a) Normally b) generally c) recursively d) currently
Answer:c
A binary tree is made of nodes are ______
a) one b) two c) three d) four
Answer:b
The parent first and then left and right children is _______
a) preorder b) inorder c) postorder d) treeorder
Answer:a
The left child, then the parent and the right child is _____
a) preorder b) inorder c) postorder d) treeorder
Answer:b
The left child, then the right child and then the parent is _____
a) preoder b) inorder c) postorder d) treeorder
Answer:c
The searching in a BST always starts at the __
a) root b) Node c) parent d) child
Answer:a
An AVL tree is another balanced binary and ___
a) link tree b) search tree c) root tree d) compare tree
Answer:b
In linked lists there are noNULL links in:
a) Single linked list b) Linear doubly linked list
c) circular linked list d) None of the above
Answer:c
In a Stack the command to access nth element from the top of the stacks will be
a) S[Top-n] b) S [Top+n] c) S [top-n-1] d) None of the above
Answer:a
In a balance binary tree the height of two sub trees of every node can not differ by more than
a) 2 b) 1 c) 0 d) 3
Answer:b
The result of evaluating pre fix expression */b+-dacd, where a = 3, b = 6, c = 1, d = 5 is
a) 0 b) 5 c) 15 d) 20
Answer:c
In an array representation of binary tree the right child of root will be at location of
a) 2 b) 5 c) 3 d) 0
Answer:c
The total number of comparisons in a bubble sort is
a) O(n log n) b) O(2n) c) O(n2) d) None of the above
Answer:a
The dummy header in linked list contain _____________
a) First record of the actual data b) Last record of the actual data
c) Pointer to the last record of the actual data d) None of the above
Answer:a
Write the output of the following program: int a[] = {1,2,3}*P;
a) 3 b) Junk value c) Run time error d) Address of the third
element
Answer:b
If the out degree of every node is exactly equal to M or 0 and the num ber of nodes at level K
is Mk-1 [consider root at level 1], then tree is called as
a) Full m-ary try b) Complete m-ary tree c) Positional m-ary tree d)
All the above
Answer:c
A ____________is a linear list in which insertions and deletions are made to either end of the
structure
a) Circular queueb) random of queue c) priority queue d) dequeue
Answer:d
The Postfix notation of the expression A*(B+C)*D is__________.
a) ABC+*D b) ABCD+* c) A+B+C*D d) A+B+C*D
Answer:c
The number of comparisons done by sequential search is ______
a) (n/2)+1 b) (n+1)/2
c) (n-1)/2 d) (n*1)/2
Answer:b
Which of the following need not be a binary tree?
a) Search tree b) Heap
c) AVL-tree d) B-Tree
Answer:d
The complexity of binary search algorithm is ________.
a) O (n) b) O (log)
c) O (n2) d) O (n log n)
Answer:c
A character of data that binary search uses but the linear search ignores is ________.
a) Order of the list b) Length of the list
c) Maximum value in the list d) Minimum value in the list
Answer:a
________________ sorting is called inplace sort
a) Insertion sort b) Selection sort
c) Merge sort d) Quick sort
Answer:a
_______sorting is done by finding kth smallest element
a) Quick sort b) Selection sort
c) Heap sort d) Insertion sort
Answer:b
A sort which relatively 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) Heap sort d) Quick sort
Answer:d
A sorting algorithm which uses a priority Queue is called
a) Insertion sort b) Selection sort
c) Heap sort d) Quick sort
Answer:c
Database Systems
1. Data is:
a) A piece of fact b) metadata c) Information d) None of these
Answer: a)A piece of fact
2. Which of the following is none of the database element?
a) Data b) constrain and schema c) Relationships d) object
Answer: d) object
3. The name of the system database that contains descriptions of data in the database is:
a) Data dictionary b) Metadata c) Table d) none of these
Answer: b) metadata
4. Relationships could be of the following type:
a) one to one relationships b) one to many relationships
c) Many to many relationships d) all of these
Answer: d) all of these
5. IDS formed the basis for the:
a) Network model b) hierarchical model c) Relational model d) all of these
Answer: a) Network model
6. DSDL is used to specify:
a) Internal schema b) external schema c) Conceptual schema d) None of these
Answer: a) Internal schema
7. DDL stands for_________________
a) Data Document language b) Data Definition Language
c) Data Division Language d) none of these
Answer: b) Data Definition Language
8. DML stands for_________________
a) Document Model Language b) Data Model Language
c) Data Manipulation Language d) none of these
Answer: c) Data Manipulation Language
9. Which of the following is the type of metadata:
a) Operational b) EDW
c) Data mart d) all of these
Answer: c) Data mart
10. A file is a collection of related sequence of records:
a) Related records b) related fields
c) Related data items d) System Record
Answer: a) Related records
11. A collection of data designed to be used by different people is called:
a) Database b) RDBMS
c) DBMS d) None of the above
Answer: a) Database
12. Which of the following is a characteristic of the data in database?
a) processor b) memory c) Independent d) all of these
Answer: c) Independent
13. The explanation of BCNF is
a) Boyd-Codd Normal Form b) Boyce-Ccromwell Normal Form
c) Boyce-Codd Normal Form d) none of these
Answer: c) Boyce-Codd Normal Form
14. An object-oriented DBMS is capable of holding:
a) Data and text b) picture and images
c) Voice and video d) Structure and components
Answer: d) Structure and components
15. Which of the following is not an object oriented features?
a) Inheritance b) abstraction
c) Polymorphism d) network
Answer: d) network
16. A record-based data model are used to:
a) Specify over all logical structure of the database b) describes data and its relationships
c) High level description of storage structure and access mechanism d) All of the above
Answer: a) Specify over all logical structure of the database
17. An object-oriented data models are used to:
a) Specify over all logical structure of the database b) describes data and its relationships
c) High level description of storage structure and access mechanism d) all of these
Answer: b) describes data and its relationships
18. Relational data model was first introduced by:
a) APARC b) E.F.Cord c) ANSI d) chen.
Answer: b) E.F.Cord
19. The E-R data model was first by:
a) APARC b) E.F.Cord c) ANSI d) chen.
Answer: d) chen.
20. What is the smallest unit of data in the relational model?
a) Data type b) Field c) Data value d) None of these.
Answer: b) field
21. Which is the RDBMS terminology for the number of attributes in a relation?
a) Data type b) Field c) Data value d) none of these
Answer: a) Data type
22. What is a set of possible data values called?
a) Degree b) relationships
c) Domain d) Tuple.
Answer: c) Domain
23. What is the RDBMS terminology for a set of legal values that an
attribute can have?
a) Tuple b) Relation
c) Attribute d) Domain
Answer: d) domain
24. What is the RDBMS terminology for a column?
a) Tuple b) Relation
c) Attribute d) Domain
Answer: c) Attribute
25. A table can have only one:
a) Primary key b) alternative key
c) Candidate key d) all of this
Answer: a) Primary key
26. What is the degree of a table with 5000 rows and 50 columns?
a) 50 b) 500
c) 5000 d) all of this
Answer: a) 50
27. The father of relational database is:
a) Pascal b) C.J Date
c) Dr.Edgar F. Cord d) none of these
Answer: c) Dr.Edgar F. Cord
28. Which of the following is not a relational database system?
a) Ingress b) DB2
c) IMS d) None of these
Answer: c) IMS
29. What is the RDBMS terminology for row?
a) Tuple b) Relation
c) Attribute d) domain
Answer: a) Tuple
30. What is the cardinality of a table with 5000 rows and 50 columns?
a) 10 b) 50
c) 500 d) 5000
Answer: d) 5000
31. Who developed SEQUEL?
a) Dr.E.F. Codd b) Chris Date
c) D.Chamberlain d) None of these
Answer: d) None of these.
32. System R was based on
a) Tuple b) Relation
c) Attribute d) A and B
Answer: d) A and B
33. Which of the following is a data query statement in QUEL?
a) GET b) RETRIEVE
c) SELECT d) None of these.
Answer: b) RETRIEVE
34. The first commercial RDBMS is:
a) INGRESS b) DB2
c) ORACLE d) None of these.
Answer: a) INGRESS
35. Which of the following is the result of a SELECT statement?
a) TRIGGER b) INDEX
c) TABLE d) None of these.
Answer: c) TABLE
36. Which of the following is a clause in SELECT statement?
a) GROUP BY and HAVING b) ORDER BY
c) WHERE d) All of these.
Answer: d) All of these.
37. Which is the following table is used to modify a table?
a) MODIFY TABLE b) UPDATE TABLE
c) ALTER TABLE d) All of these.
Answer: d) All of these.
38. ALTER operation of SQL is used for:
a) Deleting tables from schema b) change of the definition of the table
c) Both of these d) None of these
Answer: b) change of the definition of the table
39. Which of the following clause specifies the table or tables from where
the data has to be retrieved?
a) WHERE b) TABLE
c) FROM d) None of these
Answer: c) FROM
40. SELECT operation of SQL is a:
a) Data Query language b) data definition language
c) Data manipulation language d ) data control language
Answer: a) Data Query language
41. How many tables can be joined to create a view?
a) 1 b) 2
c) Database dependent d) None of these.
Answer: d) None of these
42. Which of the following is used to get all the columns of a table?
a) * b) @
c) % d) #
Answer: a) *
43. REVOKE command of SQL is a:
a) Data Query language b) data definition language
c) Data manipulation language d ) data control language
Answer: d) data control language
44. Which of the following is not a DDL statement?
a) ALTER b) DROP
c) CREATE d) SELECT
Answer: d) SELECT
45. Which of the following is not a DML statement?
a) UPDATE b) COMMIT
c) INSERT d) DELETE.
Answer: b) COMMIT
46. An attribute is a(n):
a) Column of a table. b) Two dimensional table.
c) Row of a table d) Key of a table.
Answer: b) column of a table.
47. QBE was originally developed by
a) Dr. E. F. Codd b) M. M. Zloof
c) T. J. Watson d) None of these.
Answer: b) M. M. Zloof
48. Which of the following is a comparison operator used in SELECT
statement?
a) Like b) BETWEEN c) IN d) Not equal to
Answer: d) Not equal to
49. GRANT command of SQL is a:
a) Data Query language b) data definition language
c) Data manipulation language d) data control language
Answer: d) data control language
50. COMMIT Statement of SQL TCS
a) Ends the transaction successfully b) aborts the transaction
c) Both of these d) none of these
Answer: a) Ends the transaction successfully
a) 8 b) 10
c) 2 d) 9
Answer: a) 8
a) 17 b) 16
c) 15 d) 8
Answer: b) 16
a) 8 b) 15
c) 17 d) 11
Answer: d) 11
a) 1000 b) 1100
c) 1010 d) 1001
Answer: c) 1010
5. The number FF in Hexadecimal system is equivalent to ________ in decimal
a) 256 b) 255
c) 240 d) 239
Answer: a) 256
a) 675 b) 275
c) 572 d) 573
Answer: b) 275
a) 10101.001 b) 10100.001
c) 10101.010 d) 10100.111
Answer: a) 10101.001
a) 141 b) 22
c) 56 d) 78
Answer: b) 22
12. Which type is the Binary Coded Decimal ?
a) 8241 b) 8421
c) 8124 d) 8121
Answer: b) 8421
14. The decimal value for the BCD coded number 00010010 is ________
a) 6 b) 10
c) 12 d) 18
Answer: c) 12
a) 10 b) 0
c) 1 d) 9
Answer: c) 1
16. The binary addition of two numbers 01 +01 produces result as ______
a) 10 b) 11
c) 01 d) 02
Answer: a) 10
as_______
a) 10 b) 11
c) 1 d) 0
Answer: c) 1
a) 946 b) 652
c) 281 d) 218
Answer: c) 281
20. Express the following Excess-3 code 0110 1011 1100 0111 as decimal
a) 3894 b) 3984
c) 3489 d) 9834
Answer: a) 3894
a) 01110 b) 11101
c) 11110 d) 00011
Answer: b) 11101
a) 111100001 b) 000011110
c) 010101010 d) 101100100
Answer: d) 101100100
a) 0110 b) 1110
c) 1111 d) 1010
Answer: a) 0110
a) 33.2 b) 30.1
c) 30.2 d) 30.5
Answer: d) 30.5
a) 11111110 b) 100000110
c) 10000000 d) 000000101
Answer: c) 10000000
a) 11111100 b) 00000100
c) 11111110 d) 11100010
Answer: a) 11111100
a) 101 b) 100
c) 110 d) 001
Answer: b) 100
29. Convert the given binary number into both their 1’s and 2’s
complements 1011
a) 7240 b) 2740
c) 4027 d) 2470
Answer: b) 2740
a) A b) 1
c) 0 d) None
Answer: b) 1
32. The gate that gives 1 output if any one of the inputs is 0, is
a) AND b) NAND
c) XOR d) None
Answer: b) NAND
a) 1 b) A
c) 0 d) None
Answer: a) 1
a) AND b) OR
c) XOR d) NAND
Answer: d) NAND
a) NOR b) XOR
c) NOT d) OR
Answer: c) NOT
a) A b) 1
c) 0 d) none
Answer: b) 1
a) AND b) NAND
c) XOR d) NOT
Answer: c) XOR
a) 1 b) 3
c) 2 d) 4
Answer: b) 3
a) NOT b) OR
c) AND d) NAND
Answer: a) NOT
a) A’+ B’ b) A+B
c) A’.B’ d) A.B
Answer: a) A’+ B’
a) AND-AND b) OR-OR
c) NAND-NAND d) NOR-NOR
Answer: c) NAND-NAND
a) OR b) NAND
c) AND d) NOR
Answer: d) NOR
44. With three variables, a Karnaugh map of _______ boxes has to be constructed for simplification
a) 4 b) 8
c) 12 d) 16
Answer: b) 8
45. In a four-variable Karnaugh map, if eight 1’s are grouped, then the resulting term contains
_________ variable(s).
a) 1 b) 2
c) 3 d) 4
Answer: a) 1
46. If all the inputs and the output of an AND gate are inverted, then ____ gate can be used.
a) NOT b) NAND
c) OR d) NOR
Answer: c) OR
a) Addition b) Multiplication
c) Division d) Comparison
Answer: d) comparison
a) 101 b) 010
c) 110 d) 001
Answer: b) 010
a) (A+B)(C+D)(E+F) b) (AD)(BE)(CD)
c) AB(CD)EF d) AB+CD+EF
Answer: d) AB+CD+EF
50. If a four-variable Karnaugh map contains all 1’s, then the minimal
a) 0 b) 1
c) 111 d) 1111
Answer: b) 1