1.
Database Concepts (10 MCQs)
1. Which model organizes data in tables?
a) Relational
b) Hierarchical
c) Network
d) Object-oriented
→ Answer: a
2. A table in a database is called a:
a) Field
b) Domain
c) Relation
d) Attribute
→ Answer: c
3. Which key uniquely identifies each record?
a) Alternate Key
b) Primary Key
c) Foreign Key
d) Candidate Key
→ Answer: b
4. A domain in DBMS refers to:
a) A row
b) A file
c) Set of valid values
d) Table name
→ Answer: c
5. Which key connects two tables?
a) Alternate Key
b) Candidate Key
c) Foreign Key
d) Derived Key
→ Answer: c
6. A file system is __________ compared to a database system.
a) More efficient
b) Less secure and organized
c) More scalable
d) Intelligent
→ Answer: b
7. Which of the following is not part of relational algebra?
a) Union
b) Sort
c) Selection
d) Projection
→ Answer: b
8. Which operation is used to combine all records from two tables?
a) Intersection
b) Union
c) Projection
d) Selection
→ Answer: b
9. What is a tuple in DBMS?
a) Table
b) Row
c) Column
d) Field
→ Answer: b
10. Which key can have multiple values as long as they are unique?
a) Candidate Key
b) Foreign Key
c) Composite Key
d) Duplicate Key
→ Answer: a
2. SQL - Basics (10 MCQs)
11. The command to create a new table is:
a) INSERT
b) ALTER
c) CREATE
d) MAKE
→ Answer: c
12. Which clause is used to filter rows?
a) GROUP BY
b) SELECT
c) WHERE
d) ORDER
→ Answer: c
13. Which is used to add new data?
a) UPDATE
b) INSERT
c) DELETE
d) ALTER
→ Answer: b
14. To remove a table, use:
a) DELETE
b) DROP
c) REMOVE
d) ERASE
→ Answer: b
15. Which function returns the remainder?
a) ROUND()
b) MOD()
c) POWER()
d) LENGTH()
→ Answer: b
16. What does LCASE() do?
a) Capitalize text
b) Convert to lowercase
c) Count characters
d) Trim spaces
→ Answer: b
17. Which keyword is used to modify a table structure?
a) CHANGE
b) ALTER
c) MODIFY
d) UPDATE
→ Answer: b
18. SUBSTRING('Hello', 2, 3) returns:
a) Hel
b) ell
c) llo
d) lo
→ Answer: b
19. Which clause is used to sort results?
a) WHERE
b) GROUP BY
c) ORDER BY
d) FILTER
→ Answer: c
20. SELECT COUNT(*) FROM table; returns:
a) Number of columns
b) Number of rows
c) Sum of values
d) Maximum value
→ Answer: b
3. SQL - Advanced (10 MCQs)
21. Which function gives the maximum value?
a) COUNT()
b) MAX()
c) SUM()
d) AVG()
→ Answer: b
22. The JOIN operation is used to:
a) Filter records
b) Combine tables
c) Delete data
d) Update data
→ Answer: b
23. The result of ROUND(4.789, 1) is:
a) 4.7
b) 4.8
c) 4.78
d) 5
→ Answer: b
24. NOW() returns:
a) Year only
b) Time only
c) Date and Time
d) Month only
→ Answer: c
25. GROUP BY is used with:
a) WHERE
b) Aggregate Functions
c) DELETE
d) INSERT
→ Answer: b
26. What is the default join in SQL?
a) INNER JOIN
b) LEFT JOIN
c) FULL JOIN
d) OUTER JOIN
→ Answer: a
27. Which function finds number of characters?
a) MID()
b) LENGTH()
c) COUNT()
d) UCASE()
→ Answer: b
28. The difference between two relations is found using:
a) MINUS
b) INTERSECT
c) UNION
d) JOIN
→ Answer: a
29. HAVING is used to:
a) Filter grouped data
b) Rename columns
c) Limit rows
d) Sort records
→ Answer: a
30. Which function returns the first 3 letters of “Python”?
a) LEFT('Python', 3)
b) SUBSTRING('Python', 1, 3)
c) MID('Python', 3)
d) RIGHT('Python', 3)
→ Answer: b
4. Computer Networks (10 MCQs)
31. Which device connects two different networks?
a) Switch
b) Repeater
c) Hub
d) Router
→ Answer: d
32. LAN stands for:
a) Local Area Node
b) Local Area Network
c) Long Area Network
d) Limited Access Network
→ Answer: b
33. Which topology connects all devices in a loop?
a) Star
b) Ring
c) Bus
d) Tree
→ Answer: b
34. The unique hardware address of a device is its:
a) IP Address
b) MAC Address
c) URL
d) Port
→ Answer: b
35. Internet is a:
a) Software
b) Web page
c) Network of networks
d) Browser
→ Answer: c
36. Which of these is not a networking device?
a) Router
b) Hub
c) Compiler
d) Switch
→ Answer: c
37. Which topology uses a central node?
a) Star
b) Mesh
c) Bus
d) Ring
→ Answer: a
38. MAN stands for:
a) Metropolitan Access Network
b) Metropolitan Area Network
c) Multiple Access Network
d) Multi-Area Network
→ Answer: b
39. What is a gateway used for?
a) Increasing speed
b) Connecting different networks
c) Filtering data
d) Reducing size
→ Answer: b
40. Which address is assigned by ISP?
a) MAC Address
b) IP Address
c) Physical Address
d) Static Address
→ Answer: b
5. Python - Exception & File Handling (10 MCQs)
41. What type of error is caught by try-except?
a) Syntax error
b) Exception
c) Logical error
d) Compilation error
→ Answer: b
42. Which clause is always executed in Python?
a) try
b) except
c) finally
d) else
→ Answer: c
43. What is the extension for binary files?
a) .txt
b) .html
c) .bin
d) .csv
→ Answer: c
44. Which Python module is used for binary file handling?
a) csv
b) math
c) pickle
d) os
→ Answer: c
45. open("data.txt", "r") is used to:
a) Read
b) Write
c) Append
d) Remove
→ Answer: a
46. What does raise do in Python?
a) Loops the code
b) Triggers an exception
c) Deletes files
d) Ends program
→ Answer: b
47. Which is not a file access mode?
a) r
b) t
c) w
d) a
→ Answer: b
48. What keyword is used to handle exceptions?
a) throw
b) try
c) check
d) def
→ Answer: b
49. What does .read() do?
a) Opens a file
b) Reads entire file content
c) Deletes file
d) Returns filename
→ Answer: b
50. The code inside finally runs:
a) Only on error
b) Always
c) Never
d) If no error
→ Answer: b
6. Stack & Queue (10 MCQs)
51. Stack follows which principle?
a) FIFO
b) LIFO
c) FILO
d) Random
→ Answer: b
52. push() adds element to:
a) Top of stack
b) End of queue
c) Bottom of stack
d) Start of list
→ Answer: a
53. Which removes last inserted element in stack?
a) Insert
b) PopFront
c) Pop
d) Push
→ Answer: c
54. Queue follows:
a) FIFO
b) LIFO
c) FILO
d) None
→ Answer: a
55. Which queue allows insertion from both ends?
a) Simple Queue
b) Deque
c) Circular Queue
d) Static Queue
→ Answer: b
56. Which expression type has operators between operands?
a) Infix
b) Prefix
c) Postfix
d) None
→ Answer: a
57. Which expression type has operator after operands?
a) Prefix
b) Postfix
c) Infix
d) Mixed
→ Answer: b
58. Converting infix to postfix uses:
a) Queue
b) Stack
c) List
d) Dictionary
→ Answer: b
59. Which function removes item from queue?
a) pop()
b) remove()
c) delete()
d) dequeue()
→ Answer: d
60. What does stack.pop() do in Python?
a) Add item
b) Remove last item
c) Return length
d) Sort
→ Answer: b
7. Searching & Sorting (10 MCQs)
61. Binary Search works on:
a) Unsorted data
b) Sorted data
c) Random data
d) Text only
→ Answer: b
62. Which is the simplest search technique?
a) Linear/Sequential Search
b) Binary
c) Hashing
d) Sort
→ Answer: a
63. Best case for binary search is:
a) Last element
b) Middle element
c) First element
d) Not found
→ Answer: b
64. Bubble sort compares:
a) Adjacent elements
b) First and last
c) All at once
d) None
→ Answer: a
65. Which sort selects the smallest repeatedly?
a) Bubble
b) Selection
c) Merge
d) Quick
→ Answer: b
66. Insertion sort is best for:
a) Large unsorted data
b) Random data
c) Nearly sorted data
d) Binary trees
→ Answer: c
67. Which method uses key to access data?
a) Hashing
b) Searching
c) Sorting
d) Indexing
→ Answer: a
68. Collision occurs in:
a) Hashing
b) Sorting
c) Searching
d) Queues
→ Answer: a
69. Binary search requires:
a) Sorted array
b) Hashed array
c) Tree
d) Graph
→ Answer: a
70. In best case, linear search finds item at:
a) First position
b) Last
c) Not found
d) Middle
→ Answer: a
8. Pandas (Data Handling) – 10 MCQs
71. Pandas is used in Python for:
a) Networking
b) Data analysis
c) Graphics
d) Encryption
→ Answer: b
72. Which data structure in Pandas is 1-dimensional?
a) DataFrame
b) Series
c) Dictionary
d) Array
→ Answer: b
73. What function shows the first few rows of data?
a) head()
b) top()
c) show()
d) first()
→ Answer: a
74. Which of these creates a DataFrame?
a) pandas.DataFrame()
b) pandas.Row()
c) pandas.Series()
d) pandas.Table()
→ Answer: a
75. Which method reads a CSV file?
a) pd.load()
b) pd.read_csv()
c) pd.import_csv()
d) pd.get_csv()
→ Answer: b
76. Missing values can be filled using:
a) insert()
b) dropna()
c) fillna()
d) None
→ Answer: c
77. To delete a column in DataFrame:
a) del df['column']
b) df.remove()
c) df.erase()
d) df.pop()
→ Answer: a
78. Grouping data is done using:
a) classify()
b) groupby()
c) filter()
d) sort()
→ Answer: b
79. What does df.describe() show?
a) Column names
b) Plot
c) Summary statistics
d) Index only
→ Answer: c
80. Standard deviation in Pandas is found using:
a) average()
b) std()
c) var()
d) mean()
→ Answer: b
9. Matplotlib (Plotting) – 10 MCQs
81. Which library is used for plotting in Python?
a) NumPy
b) Pandas
c) Matplotlib
d) CSV
→ Answer: c
82. Line graph is drawn using:
a) plot()
b) graph()
c) line()
d) draw()
→ Answer: a
83. Which plot shows data distribution?
a) Bar chart
b) Histogram
c) Line chart
d) Pie chart
→ Answer: b
84. Which function saves a plot to file?
a) save()
b) store()
c) savefig()
d) saveplot()
→ Answer: c
85. Which plot shows parts of a whole?
a) Pie chart
b) Line plot
c) Box plot
d) Bar graph
→ Answer: a
86. Which parameter changes line color?
a) color
b) linestyle
c) label
d) width
→ Answer: a
87. To show plot on screen:
a) print()
b) show()
c) display()
d) reveal()
→ Answer: b
88. A scatter plot is used to show:
a) Text
b) Circular data
c) Relationship between 2 variables
d) Bar heights
→ Answer: c
89. Dashed lines are set using:
a) linestyle='solid'
b) linestyle='--'
c) linestyle='..'
d) linestyle='dotted'
→ Answer: b
90. To add title to a plot:
a) set_title()
b) plot_title()
c) title()
d) add_title()
→ Answer: c
10. Societal Impacts & Ethics – 10 MCQs
91. What is a digital footprint?
a) A printout of a website
b) A password
c) Your activity trace online
d) A type of device
→ Answer: c
92. Plagiarism means:
a) Formatting code
b) Copying without credit
c) Buying products
d) Giving credit
→ Answer: b
93. Which of the following is an example of cybercrime?
a) Installing antivirus
b) Hacking a social media account
c) Programming
d) Installing software
→ Answer: b
94. FOSS stands for:
a) Federal Open Software Service
b) Free and Open Source Software
c) Fast Online Software Setup
d) Flexible Operating System Services
→ Answer: b
95. What law in India handles cybercrimes?
a) IT Guide
b) IT Act
c) Web Safety Law
d) Cyber Manual
→ Answer: b
96. What is e-waste?
a) Spam emails
b) Electronic waste
c) Online trash
d) Chat data
→ Answer: b
97. What is phishing?
a) Internet gaming
b) Tricking people to reveal personal info
c) Chatting online
d) Creating websites
→ Answer: b
98. Creative Commons is related to:
a) Currency
b) Licensing and sharing content
c) Graphics
d) Encryption
→ Answer: b
99. Which can prevent cyber threats?
a) Java
b) Firewall
c) Compiler
d) Word Processor
→ Answer: b
100. Which health issue is caused by overuse of technology?
a) Allergy
b) Eye strain
c) Cough
d) Toothache
→ Answer: b