Cs Topper Module
Cs Topper Module
13) What type of software is required to view or modify the contents of a binary file?
a) Text editor b) Any word processor
c) Spread sheet application d) Specific software designed for handling binary files
14) Binary files are also stored in terms of
a) 0‟s and 1‟s b) 0‟s and 2‟s c) 0‟s and 9‟s d) ASCII
15) Which function in Python is used to open a file for writing data?
a) [Link]() b) open() c) openfile() d) write()
16) How are binary files stored in a computer?
a) As sequences of words. b) As sequences of bytes.
c) As sequences of characters. d) As a sequence of symbols.
17) What does the <file>.mode attribute return in Python?
a) The name of the file
b) The current file pointer position
c) The access mode in which the file was opened
d) The contents of the file
18) Which of the following access modes opens a file for reading only?
a) r b) w b) r+ d) a
19) Which mode is used to Opens the file in read-only mode in python ?
a) <r+> b) <w> c) <a> d) <r>
20) Which mode is used to Opens the file in binary and read-only mode ?
a) <rb> b) <wb> c) <ab> d) <rb+>
21) Which of the following modes allows you to open a file for both reading and writing?
a) <r+> b) <a+) c) <wb+> d) <a+>
22) In Python, what happens when the file you are trying to open in write mode („w‟) does not exist?
a) An error is thrown. b) A new empty file is created.
c) A new empty file is not created. d) Nothing happens.
23) In Python, when you open a file in „w‟ mode, what happens to the file if it already exists?
a) The file will be overwritten with the new data
b) The file will remain unchanged
c) A new file will be created and the data will be written into it
d) Python will raise an error
24) What does the mode „w‟ do when opening a file in Python?
a) Opens the file for reading only
b) Opens the file for writing and creates the file if it doesn‟t exist
c) Opens the file for both reading and writing
d) Opens the file for appending data
25) Which of the following file modes in Python is used to open a file for appending data without
overwriting the existing content?
a) <r> b) <w> c) <a> d) <x>
26) Which of the following file modes in Python is used to open a file for appending data overwriting the
existing content?
a) <r> b) <w> c) <a> d) <x>
27) The following file modes in Python is used to Opens the file in append and read mode.
a) <r> b><w+> c) <r+> d) <a+>
28) What is the purpose of the close() function in Python file handling?
a) To save data to the file
b) To stop reading data from the file
c) To ensure that the file is closed after reading or writing
d) To open a file for further reading or writing
29) When using the with statement to open a file, what happens when the block inside with is exited?
a) The file must be closed manually. b) The file is automatically closed.
c) The file is closed only if there‟s an error. d) The file remains open until the program ends.
30) After opening a file with the open() function, how do you close the file to free up resources?
a) file_object.close() b) file_object.end() c) file_object.finish() d) file_object.closefile()
31) The correct syntax of file close is
a) file(close) b) [Link]() c) [Link]( ) d) close(file)
32) Which of the following is the correct syntax to open a file in write mode?
a) obj=open(“[Link]”, „r‟) b) obj=open(“[Link]”, „w‟)
c) obj=open(“[Link]”, „rw‟) d) obj=open(“[Link]”, “x”)
33) What does the write() method return ?
a) Writing is successful b) It does not return the number of characters
c) The number of characters written d) Return file object
34) What does the writelines() method return ?
a) Writtern only binary digits b) The number of characters read
c) The number of characters written d) It does not return the number of characters
35) Which of the following method is used to write multiple strings to a file.
a) write() b) writing() c) writestring() d) writelines()
36) What does the read() method do in Python?
a) It reads only the first line b) Reads a specified number of bytes from a file
c) Reads a single line from a file d) Write a specified number of bytes from a file
37) Which of the following is true about the read() method without any arguments?
a) It reads only the first line b) It reads a fixed number of characters
c) It reads the entire file d) It throws an error
38) What does the readlines() method do in Python?
a) Reads the entire file as a single string
b) Reads the file in all the lines and returns a list of lines
c) Reads the first line of the file
d) Reads all lines and prints them
39) Which of the following statements is TRUE regarding the readline() method?
a) It can be used to read a specific number of bytes from the file.
b) It only reads the first line of a file regardless of the value of n.
c) It reads the file until the newline character is reached, then stops.
d) It modifies the content of the file while reading it.
40) Which method returns the current position of the file object in python ?
a) [Link]() b) [Link]() c) [Link]() d) [Link]()
41) If you want to move the file pointer to a specific position, which method should be used in
combination with tell()?
a) seek() b) open() c) read() d) close()
42) What will happen if you call writelines() on an empty list?
a) It will raise an exception. b) It will write an empty line to the file.
c) It will not write anything to the file. d) It will overwrite the file with an empty string.
43) If you want to read a file line by line in Python, which of the following would you use?
a) [Link]() b) [Link]() c) [Link]() d) [Link]()
44) What is the primary purpose of Pickle in Python?
a) To store Python objects in a human-readable format
b) To compress Python objects to save space
c) To serialize and store Python objects for later retrieval
d) To perform mathematical operations on Python objects
45) Which of the following modules is used to serialize and deserialize Python objects?
a) json b) pickle c) os d) sys
46) Which of the following types of objects can be serialized using Pickle?
a) Lists b) Tuples c) Dictionaries d) All of these
47) What is the primary purpose of the dump() method in Python?
a) To convert a Python object into a string
b) To convert Python object into a binary format for saving to a file
c) To save the state of a Python object as text data
d) To deserialize a Python object from a binary file
48) Which module provides the dump() method to serialize objects in Python?
a) pickle b) json c) marshal d) os
49) In which case would you need to use the dump() method?
a) When you want to convert a binary file into a text file
b) When you need to store Python objects in a binary file
c) When you want to retrieve Python objects from a file
d) When you are reading a file‟s content line by line
50) What is the correct syntax for using the dump() method?
a) dump(data_object, file_object) b) dump(file_object, data_object)
c) file_object.dump(data_object) d) data_object.dump(file_object)
51) In the context of Pickling, what does the term “serializing” mean?
a) Making an object immutable
b) Converting an object into a byte stream for storage
c) Encrypting an object to prevent unauthorized access
d) Changing the type of an object for easier storage
52) Which of the following functions does Pickle provide for saving an object to a file?
a) [Link]() b) [Link]() c) [Link]() d) [Link]()
53) Which of the following functions does Pickle provide for loading a saved object from a file?
a) [Link]() b) [Link] ()
c) [Link]() d) [Link]()
54) In the Pickling process, which term refers to reading a serialized object from a file and restoring it to its
original state?
a) Serialization b) Deserialization c) Encryption d) Compression
55) What does the flush() method do when used with file handling in programming?
a) Closes the file immediately“ b) Clears the buffer and writes the contents to the file
c) Deletes the file contents permanently d) Opens the file for writing
1. A mechanism to store, organize and access data along with operations that can be efficiently
performed on the data is
a) datatype b) data structure c) data list d) data collection
2. Which of the following an example of a data structure?
a) Addition of new element is from front , removal of existing element is from rear end
b) Addition of new element is from rear, removal of existing element is from front end
c) Addition of new element and removal of existing element happens from middle.
d) Addition of new element, removal of existing element takes place at same end TOP.
12. Which statement is not correct about stack?
a) 56 b) 112 c) 23 d) 65
49. Assertion: Stack follows the Last-In-First-Out
Reason (R): The new element is added and an existing element is removed from the same end
Reason (R): In stack a new element is added and an existing element is removed from the one
end only
a) A is true, R is correct reason
Reason (R): The new element is added and an existing element is removed from the same end
Reason (R): The new element is added and an existing element is removed from the same end
1. Which of the following is an ordered linear list of elements having different ends for
adding and removing elements in it?
a) Stack b) Queue c) Searching d) Sorting
2. An arrangement of linear data structure in which addition and removal of elements can
happen from any end is known as
a) Stack b) Queue c) Deque d) Enqueue
3. Following is a linear list of elements in which insertion and deletion takes place from
different ends.
a) Stack b) Queue c) Searching d) Sorting
4. What is the working principle of queue?
a) LIFO b) FIFO c) FILO d) LILO
5. With respect to queue data structure which of the below statement is true?
a) Addition and removal of elements take place at front end
b) Addition and removal of elements take place at rear end
c) Addition of element is at rear end and removal of elements from the front end
d) Addition of element is at front end and removal of elements from the rear end
6. Which of the below statement is not correct with respect to queue?
a) Queue is a linear list of elements.
b) Operations on Queue are performed in FIFO order.
c) Insertion operation in queue is called Enqueue.
d) Deletion operation in queue is called pop.
7. Which data structure is used to insert and delete elements in FIFO order?
a) Stack b) Queue c) Searching d) Sorting
8. In which order elements of queue are accessed?
a) LIFO b) FIFO c) LILO d) FILO
9. Queue follows:
a) LIFO principle b) FIFO principle c) LILO principle d) FILO principle
10. FIFO stands for:
a) First -In-First-Out b) Forward -In-First-out
c) First -In-Forward-out d) Forward -In- Forward -out
11. FCFS stands for:
a) First Come First Service b) First Count First Served
c) First Come First Served d) First Come First System
12. FIFO is also called as:
a) FCFS b) LIFO c) FSFC d) FILO
13. At which end, an element can be inserted in queue?
a) Top b) Peek c) Rear d) Front
14. From which end, an element is deleted from queue?
a) Top b) Peek c) Rear d) Front
15. If elements are inserted into queue in following order „A‟,‟S‟,‟D‟ and „F‟ and
then elements are removed, in which order elements are removed?
a) „A‟,‟S‟,‟D‟ ,„F‟ b) „F‟, ‟D‟, ‟S‟, „A‟ c) „A‟, „F‟, ‟S‟, ‟D‟ d) ‟S‟,‟D‟ , „A‟, „F‟
16. Which operation is used to insert a new element to the queue at the rear end?
a) Enqueue b) Dequeue c) Isempty d) Peek
17. Which exception will occur when inserting elements beyond capacity of the
queue?
a) Underflow b) Overflow c) Dequeue d) Enqueue
18. Which operation is used to remove one element at a time from the front
of the queue?
a) Enqueue b) Dequeue c) Isempty d) Peek
19. Which exception will occur when trying to delete an element from an
empty queue?
a) Underflow b) Overflow c) Dequeue d) Enqueue
20. The operation is used to view elements at the front of the queue, without removing
it from the Queue is
a) Enqueue b) Dequeue c) Isempty d) Peek
21. Which operation is used to check whether the queue has any element or not?
a) Enqueue b) Dequeue c) Isempty d) Peek
22. Which operation is used to simply read, but not to delete the element at the
front end of the queue?
a) Enqueue b) Dequeue c) Isempty d) Peek
23. Which operation is used to check whether any more elements can be added to the
queue or not?
a) Enqueue b) Isfull c) Isempty d) Peek
24. Which operation is used to avoid overflow exceptions while performing
enqueue operation?
a) Enqueue b) Isfull c) Isempty d) Peek
25. Which operation is used to avoid underflow exception while performing
dequeue operation?
a) Enqueue b) Isfull c) Isempty d) Peek
26. Which function always adds an element to the rear end of the queue?
a) push( ) b) insert( ) c) append( ) d) add( )
27. What is the index of pop method to delete an element from the front end of the queue?
a) 1 b) 0 c) n d) n-1
28. Which data type is used to implement a queue in Python?
a) Tuple b) Dictionary c) List d) None
29. Which built-in-function (method) is used to create an empty queue?
a) Enqueue( ) b) list( ) c) append( ) d) insert ( )
30. Which built-in-function is used to insert a new element at the end of queue?
a) Enqueue( ) b) list( ) c) append( ) d) insert( )
31. Which built-in-function is used to delete an element from the front of the queue?
a) Enqueue( ) b) pop( ) c) append( ) d) Dequeue( )
32. Which built-in-function is used to check, if the queue has an element or not?
a) isEmpty( ) b) list( ) c) append( ) d) len( )
33. Which built-in-function (method) is used to find the number of elements in
the queue?
a) Enqueue( ) b) isEmpty( ) c) isFull( ) d) len( )
34. In which condition, queue overflow occurs?
a) Queue is full and Enqueue( ) is called.
b) Queue is empty and Enqueue( ) is called.
c) Queue is full and Dequeue( ) is called.
d) Queue is empty and Dequeue( ) is called.
35. In which condition, queue underflow exception occurs?
a) Queue is full and Enqueue( ) is called.
b) Queue is empty and Enqueue ( ) is called.
c) Queue is full and Dequeue( ) is called.
d) Queue is empty and Dequeue ( ) is called.
36. Deque is a version of queue which allows insertion and deletion at
a) front end b) rear end c) both ends d) middle
37. Which of the following is a data structure where elements can be added or
removed at either end, but not in the middle?
a) Enqueue b) Dequeue c) Deque d) Queue
38. Which of the following is an arrangement in which addition and removal of
element(s) can happen from any end?
a) Enqueue b) Dequeue c) Deque d) Queue
39. Which of the following permits insertion and deletion operations from any end?
a) Enqueue b) Dequeue c) Deque d) Queue
40. Which of the following data structure does not apply any restriction on the side
from which addition/removal of elements should happen?
a) Enqueue b) Dequeue c) Deque d) Queue
41. Which of the following is also known as double ended queue?
a) Enqueue b) Dequeue c) Deque d) Queue
42. Identify the not correct statement about Deque
a) It is a data structure where elements can be added or removed at either end.
b) Adding or removal of elements can happen in the middle
c) Deque can support both stack and queue operations.
d) Insertfront operation is used to insert new element at the front of the deque.
43. Which operation is used to insert a new element at the front of the deque?
a) Enqueue b) Dequeue c) Insertrear d) Insertfront
44. Which operation is used to insert a new element at the rear of the deque?
a) Enqueue b) Dequeue c) Insertrear d) Insertfront
45. Which operation is used to remove an element from the front of the deque?
a) Enqueue b) Dequeue c) Deletionrear d) Deletionfront
46. Which operation is used to remove one element at a time from the rear
of the deque?
a) Enqueue b) Dequeue c) Deletionrear d) Deletionfront
47. Which built-in-function (method) is used to create an empty deque?
a) Enqueue( ) b) list( ) c) append( ) d) insert( )
48. Which built-in-function (method) is used to insert an element at the front of deque?
a) Enqueue( ) b) list( ) c) Insertrear( ) d) insert( )
49. Which operation is used to check the presence of element(s) in deque?
a) Enqueue b) Isfull c) Isempty d) Peek
50. Which operation is used to read value from the front of deque, without removing it
from the queue when the queue is not empty?
a) Getfront b) Insertfront c) Deletionrear d) Peek
51. Which operation is used to read value from the rear of the deque, without removing it
from the deque?
a) Getfront b) Getrear c) Deletionrear d) Peek
52. In a deque, if insertion and deletion of elements is done from the same end, it
will behave as
a) Queue b) Stack c) List d) String
20) The term is used to describe algorithms whose time complexity is n2, typically caused by nested loops
a) Linear time algorithms b) Exponential time algorithms
c) Quadratic time algorithms d) Constant time algorithms
21) Which of the following is an example of a quadratic time complexity algorithm?
a) A single loop iterating over n elements
b) A loop with n iterations and another loop with n iterations inside it
c) A recursive algorithm halving the problem size each time
d) A linear search algorithm
22) Which of the following examples represent the worst case input for an insertion sort?
a) array in sorted order b) array sorted in reverse order
c) normal unsorted array d) large array
23) A computational complexity that describes the amount of time an algorithm takes to run as a function
of the size of its input.
a) Time Complexity b) Data Complexity c) Clock Complexity d) Loop Complexity
24) Assertion : Sorting a large number of items can take a substantial amount of time.
Reason (R): The extra time of sorting is worth it when compared to the time needed to search in an
unsorted list ?
a) Both A and R are true b) Both A and R are false
c) A is true, but R is false. d) A is false, but R is true.
25) A): Bubble sort compares adjacent elements in each pass and swaps them if they are not in order.
R): The largest unsorted element "bubbles up" to its correct position at the end of the list.
a) Both A and R are true b) Both A and R are false
c) A is true, but R is false. d) A is false, but R is true.
26) Assertion : In Bubble sort, the total number of passes required to sort a list with n elements is n-
Reason (R): In each pass, the smallest element is placed at its correct position in the list.
a) Both A and R are true b) Both A and R are false
c) A is true, but R is false. d) A is false, but R is true.
27) : In Bubble Sort, the size of the unsorted portion of the list decreases with each pass.
(R) : After each pass, the largest unsorted element is placed at the end of the list, making it sorted.
a) Both A and R are true b) Both A and R are false
c) A is true, but R is false. d) A is false, but R is true.
28) Assertion : Selection sort makes (n - 1) passes through a list of n elements to sort the list.? Reason
(R): In selection sort, the list is divided into two parts: a sorted left list and an unsorted right list.
a) Both A and R are true b) Both A and R are false
c) A is true, but R is false. d) A is false, but R is true.
29) Assertion : In selection sort, the number of passes required to sort a list of n elements is (n-1). Reason
(R): In each pass, selection sort places the smallest (or largest) element from the unsorted part of the
list to the beginning of the unsorted section.
a) Both A and R are true b) Both A and R are false
c) A is true, but R is false. d) A is false, but R is true.
30) Assertion : In selection sort, the sorted and unsorted parts of the list are clearly separated during the
sorting process.
Reason (R): The selection sort repeatedly compares adjacent elements and swaps them if they are in
the wrong order.
a) Both A and R are true b) Both A and R are false
c) A is true, but R is false. d) A is false, but R is true.
31) Assertion : Selection sort is an in-place sorting algorithm.
Reason (R): It does not require any extra memory space other than the input array.
b) Both A and R are false b) A is true, but R is false.
c) A is false, but R is true. d) Both A and R are true
32) Assertion : In Selection Sort, the smallest element is found & placed at the beginning in each pass.
Reason (R): In each pass of Selection Sort, all elements of the unsorted list are compared to find the
minimum value.
a) Both A and R are false b) Both A and R are true
c) A is true, but R is false d) A is false, but R is true
33) In selection sort the smallest element is selected in each pass and placed in its correct position.
(B) In selection sort the nth element is the last, and it is already in place
a) A is true and B is false b) A is false and B is true
c) A and B are true d) A and B are false
34) Assertion : Insertion sort divides the list into a sorted and an unsorted part.
Reason (R): Each element from the unsorted part is inserted into its correct position in the sorted part
by traversing the sorted part backward.
a) A is false, but R is true b) Both A and R are false
c) A is true, but R is false d) Both A and R are true
35) : In insertion sort, in each pass, the sorted list is traversed from the backward direction. (R):
This is done to find the correct position to insert the current element from the unsorted list.
a) Both A and R are false b) A is true, but R is false
c) A is false, but R is true d) Both A and R are true
36) Assertion : In insertion sort, the first pass starts with an empty sorted list. Reason
(R): The sorted list initially contains the smallest element from the entire list.
a) Both A and R are false b) A is true, but R is false
c) A is false, but R is true d) Both A and R are true
CHAPTER - 6 SEARCHING
1 MARK MCQ’S
1. What is searching?
a) Arranging a given collection of elements in some particular order
b) Finding the location of an element from the list
c) Removing elements from the list
d) Finding the largest element
2. Which of the following method is fundamental and the simplest search method?
a) Linear search b) Binary search c) Search by hashing d) Selection search
3. In which searching technique, each element in the list is compared one by one with the key?
a) Linear search b) Binary search c) Search by hashing d) Selection search
4. Which of the following is sequential search or serial search?
a) Linear search b) Binary search c) Search by hashing d) Selection search
5. Which of the following technique is useful for collection of items that are small in size and are
unordered?
a) Linear search b) Binary search c) Search by hashing d) Selection search
6. In which searching technique, the key to be searched is compared with the element in the middle
of a sorted list?
a) Linear search b) Binary search c) Search by hashing d) Sequential search
7. Which of the following searching technique is used only on ordered (sorted) list?
a) Linear search b) Binary search c) Search by hashing d) Sequential search
8. Following searching requires only one key comparison to discover the presence or absence of a
key.
a) Linear search b) Binary search c) Search by hashing d) Sequential search
9. Statement : Linear search method compares key element with the all elements of the list from
beginning to end.
Statement (B) : Binary search method Compares key element with middle element only.
a) A is true B is false b) Both A and B are false
c) A is false B is true d) Both A and B are true
10. Statement : Linear search method is the most fundamental and simplest method of searching
Statement (B) : Linear search is also called as sequential search method.
a) A is true B is false b) Both A and B are false
c) A is false B is true d) Both A and B are true
11. Statement : Linear search method is the most fundamental and simplest method of
searching
Statement (B) : In linear search method the key element is compared only with middle
element
a) A is true B is false b) Both A and B are false
c) A is false B is true d) Both A and B are true
12. Statement : Linear search method will take more time
Statement (B) : Binary search method applicable for only sorted list
a) A is true B is false b) Both A and B are false
c) A is false B is true d) Both A and B are true
14. Statement : Linear search method applicable for sorted and unsorted list
Statement (B) : Binary search method applicable for only sorted list
a) A is true B is false b) Both A and B are false
c) A is false B is true d) Both A and B are true
15. In binary search if the search element is greater than middle element then search
continues in?
a) Left side of the list b) Right side of the list
c) First location of the list d) Last location of the list
16. In binary search if the search element is less than middle element then search continues in?
a) Left side of the list b) Right side of the list
c) First location of the list d) Last location of the list
17. Which is the best searching method used to search in a dictionary?
a) Linear search b) Binary search c) Search by hashing d) Selection search
18. When two elements map to the same slot in the hash table, is called?
a) Collision b) Wrong hashing c) Resolution d) Hash function
19. Which of the following formula is used to generate hash value?
a) h(element)=element+size(hash table)
b) h(element)=element-size(hash table)
c) h(element)=element/size(hash table)
d) h(element)=element%size(hash table)
20. Assume that list contains 10 elements [34,16,2,93,80,77,51] What is hash value of the element 93?
a) 93 b) 3 c) 9 d) 0
1 MARK FILLS IN THE BLANKS
(Hashing, Binary search, Linear search, Searching, Collision, Sorted and unsorted list)
1. Searching mean finding the location of the element.
2. The simplest method of searching is Linear Search .
3. The linear search method is applicable for Sorted and unsorted list.
4. Binary Search method applied only on sorted list.
5. Hashing is a technique which can be used to know the presence of a element in just one step.
(Collision, Linear search, Binary search, Search by hash method, Remainder method, Sorted list)
1. Linear search method compares key with all elements.
2. Binary search method compares key with only middle elements.
3. Hash value is generated in search by hash method.
4. Two elements map to the same slot in the hash table is called Collision.
5. The method used in generating hash value is called reminder method.
CHAPTER 7. UNDERSTANDING DATA
MCQs:
1. ICT stands for
a) International Communication Technology
b) Information and Communication Technology
c) Integrated Computer Technology
d) Internet and Cloud Technology
2. What significant impact did the ICT revolution have?
a) Decreased volume of data generated.
b) Slowed down data processing methods.
c) Generated large volume of data rapidly.
d) Eliminated need for data storage.
3. What is the fundamental role of data?
a) To store character-based information.
b) To enable informed decision-making.
c) To provide entertainment to users.
d) To replace human understanding.
4. Data is defined as
a) Organised facts ready for decision making
b) Collection of characters, numbers and symbols
c) Processed information
d) Only numerical values
5. The singular form of “data” is:
a) Dato
b) Datium
c) Datum
d) Date
6. The government collects population data through
a) Surveys
b) Census
c) Sampling
d) Interviews
7. Which of the following is NOT an example of data?
a) Name and contact details of a person
b) Images and videos
c) Online posts and comments
d) Final analysis report
8. Data stored in electronic form is preferred because
a) It is always accurate
b) It reduces memory usage
c) Processing becomes faster and easier
d) It avoids the need of analysis
9. Weather alerts are generated by analysing
a) Voting machines
b) Sports performance details
c) Satellites data
d) Library membership
10. Data that is organised in rows and columns is called
a) Metadata
b) Structured data
c) Unstructured data
d) Processed data
11. Which of these is an example of structured data?
a) A table showing sales records
b) A social media post
c) An email message
d) A photograph
12. Which of these is an example of unstructured data?
a) Fee records in a CSV file
b) Tabular ATM transaction history
c) Newspaper articles with pictures
d) Spreadsheet of salaries
13. Metadata is best defined as
a) Data after processing
b) Data about data
c) Numerical data only
d) Structured data only
14. An image file's resolution, image size, image type are examples of
a) Structured data
b) Tabular data
c) Fixed format data
d) Metadata
15. Data collection is the process of
a) Identifying and gathering data from sources
b) Storing processed information
c) Deleting irrelevant data
d) Generating reports from databases
16. Which organisation collects global economic data for making economic forecasts?
a) UNESCO
b) NASA
c) WHO
d) IMF
17. Data storage refers to
a) Presenting information
b) Storing data on digital devices for future use
c) Deleting old files
d) Summarising data with statistics
18. Which of the following is NOT a digital storage device?
a) RAM
b) CD/DVD
c) Pen Drive
d) Memory Card
19. The first step in the data processing cycle is
a) Data output
b) Data collection
c) Data storage
d) Data processing
20. Which of these is NOT an example of automated data processing?
a) Online bill payment
b) Generating exam admit card online
c) Cash withdrawal through ATMs
d) Manual exam paper correction
MCQ
1. Which of the following is a limitation of manual record keeping?
a) Easy data retrieval
b) Automatic backup
c) Erroneous calculations while consolidating records
d) Controlled access of users
2. A file in a computer can contain
a) texts b) videos c) images d) all of the above
3. Data redundancy in file systems means
a) same data duplicated in multiple files
b) data missing in files
c) data compression in files
d) encrypted data in files
4. Data inconsistency occurs when
a) data format is changed
b) file is deleted
c) application program fails
d) same data stored in multiple files do not match
5. DBMS is a
a) collection of files b) software to manage databases
c) spreadsheet d) type of operating system
6. Which of the following is an example of DBMS?
a) MS Word b) Oracle c) Notepad d) Windows
7. Retrieving data from a database is called
a) querying b) formatting c) indexing d) modifying
8. Database schema primarily refers to
a) database user permissions b) structure of the database
c) data in the database d) snapshot of the database
9. The purpose of data constraint is
a) to store additional information about data b) to restrict the type of data inserted
c) To modify the data d) to display data to the users
10. meta-data is also called as
a) database schema b) database instance
c) database catalog d) database constraint
11. Which of the following is not an operation in data manipulation?
a) Insertion b) Formatting c) Deletion d) Update
12. In a relational database tables are called as
a) attributes b) tuples c) relations d) instances
13. A row in a relation is also called
a) domain b) tuple c) attribute d) degree
14. A column in a relation is also called
a) domain b) tuple c) attribute d) degree
15. The number of attributes in a relation is called
a) degree b) domain c) cardinality d) instance
16. The number of tuples in a relation is called
a) domain b) degree c) cardinality d) attribute
17. Candidate keys are
a) attributes that can uniquely identify the tuples
b) alternate name for primary key
c) foreign keys
d) attributes having same names
18. An alternate key is
a) another name for primary key b) candidate key not chosen as primary key
c) a composite key d) a foreign key
19. Composite primary key means:
a) one attribute is primary key b) multiple attributes together act as primary key
c) foreign key used as primary key d) any attribute is primary key
20. An attribute whose value is derived from the primary key of another relation is
a) foreign key b) candidate key c) alternate key d) secondary key
CHAPTER 9 STRUCTURED QUERY LANGUAGE
1. Which MySQL data type is fixed length and pads unused space with blanks? (easy)
a. CHAR(n)
b. VARCHAR(n)
c. TEXT
d. STRING
2. What is the maximum length allowed for a VARCHAR data type in MySQL? (easy)
a. 32,767
b. 65,535
c. 1,024
d. 255
3. Which data type should be used in MySQL to store values larger than 4,294,967,295?
(average)
a. BIGINT
b. FLOAT
c. INT
d. DOUBLE
4. Which MySQL data type is suitable for storing dates in the format 'YYYY-MM-DD’?
(easy)
a. DATETIME
b. TIME
c. TIMESTAMP
d. DATE
5. How many bytes does a FLOAT data type occupy in MySQL? (easy)
a. 2 bytes
b. 4 bytes
c. 8 bytes
d. 16 bytes
6. Why might a developer prefer VARCHAR over CHAR for storing names?(average)
a. VARCHAR is faster for indexing
b. CHAR wastes space for variable-length strings
c. CHAR supports Unicode while VARCHAR does not
d. VARCHAR automatically converts to uppercase
7. A school database stores student roll numbers. Which data type is most appropriate and
why?(difficult)
a. VARCHAR
b. CHAR
c. INT
d. DATE
8. A developer uses CHAR(10) to store student names. What is the possible drawback of this
choice?(difficult)
a. CHAR does not support special characters
b. CHAR automatically converts text to uppercase
c. CHAR always stores exactly 10 characters, wasting space
d. CHAR cannot store numeric values
9. Why might VARCHAR be preferred over CHAR for storing student addresses?(difficult)
a. CHAR cannot store space
b. VARCHAR is faster for searching
c. VARCHAR stores only the actual length of the string
d. CHAR is limited to 10 characters
10. A student’s age is stored using the INT data type. What kind of operations can be
performed on this data? (average)
a. Arithmetic operations
b. Text alignment
c. Date formatting
d. Concatenation
11. Which of the following is a relational database management system?(easy)
a. MongoDB
b. MySQL
c. No SQL
d. Graph Database
12. Which SQL statement is used to retrieve data from a database?(easy)
[Link]. [Link] [Link] [Link]
13. Which of the following is true about SQL?(average/)
a. SQL is case-sensitive
b. SQL is used only for data retrieval
c. SQL uses procedural logic
d. SQL uses English-like syntax
14. Which prompt indicates that MySQL is ready to accept SQL statements?(easy)
a. SQL>
b. mysql>
c. cmd>
d. db>
15. Which of the following is a fixed-length character data type in MySQL? (easy)
a. VARCHAR
b. CHAR
c. TEXT
d. STRING
16. Which constraint ensures that a column cannot have missing or unknown
values?(average)
a. UNIQUE
b. DEFAULT
c. NOT NULL
d. FOREIGN KEY
a. DAY()
b. DAYNAME()
c. DATE()
d. NOW()
53. What will the query SELECT MONTHNAME('2003-11-28'); return?
(average/applying)
a. 11
b. November
c. 28
d. Friday
54. Which function is used to extract the year from a date?
(average/applying)
a. YEAR()
b. DATE()
c. MONTH()
d. DAY()
55. Which of the following is a multiple row (aggregate) function?
(easy/understanding)
a. ROUND()
b. DAYNAME()
c. MAX()
d. MONTHNAME()
56. What does the query SELECT SUM(SalePrice) FROM SALE WHERE CustID = 'C0001';
do?
a. Length ()
b. Min ()
c. Now ()
d. Count ()
80. Which datatype is used to hold numbers with decimal points in MYSQL?(easy)
a. FLOAT
b. DATE
c. INT
d. INTEGER
81. The clause used to enforce condition is(easy)
a. DISTINCT
b. GROUP BY
c. ORDER BY
d. WHERE
a. Satellite links b. Ethernet cables and Wi-Fi c. Undersea fiber-optic trunk lines d. Cellular 4G/5G towers
5. The protocol introduced as standard protocol on ARPANET is
a. TCP/IP
b. HTTP
c. FTP
d. PPP
6. What is the typical maximum range a LAN can be extended to, as mentioned in the passage?
a. 10 metres
b. 100 metres
c. 1 kilometre
d. 100 kilometres
7. The network connects devices like laptops, smartphones, printers, smartphones, mobile phones
of individuals is
a. LAN
b. PAN
c. WAN
d. MAN
8. Which of the following networks connects devices within a limited distance?
a. PAN
b. MAN
c. WAN
d. LAN
9. The network which offers high data transfer rates from 10 Mbps to 1000 Mbps is
a. WAN
b. PAN
c. LAN
d. MAN
10. The network covers a larger geographical area like a city or town.
a. WAN
b. LAN
c. PAN
d. MAN
11. Which of the following is an example of a Metropolitan Area Network ?
a. A home Wi-Fi setup
b. A university campus network
c. A city-wide cable TV network
d. A Bluetooth connection between devices
12. The network connects computers and other networks across countries or continents is
a. LAN
b. PAN
c. MAN
d. WAN
13. The device converts analog signals to digital bits and vice versa is
a. Switch
b. Modem
c. Router
d. NIC
14. Which of the following data rate ranges corresponds to LAN speeds
a. 56 kbps to 128 kbps
b. 10 Mbps to 1000 Mbps
c. 10 Gbps to 100 Gbps
d. 1 bps to 100 bps
15. The modulator converts:
a. Digital signals to analog
b. Analog signals to digital
c. Binary to hexadecimal
d. analog signals to optical signals
16. The function of the demodulator is
a. Converting Digital signals to analog
b. Converting binary signals to analog signals
c. Converting Analog signals to digital
d. Sending control signals
17. Another name for an Ethernet card is
a. IDE
b. NIC
c. FireWire
d. COM1
18. Which device is a network adapter used to set up a wired network?
a. Modem
b. Wi-Fi
c. Bluetooth
d. NIC
19. Which device acts as an interface between a computer and the network?
a. Switch
b. Hub
c. NIC
d. Repeater
20. The data rate of Gigabit ethernet is
a. 2048 Mbps
b. 1000 Mbps
c. 512 Mbps
d. 4096 Mbps
21. The network circuit mounted on the motherboard of a computer is
a. NIC
b. Router
c. Graphics Processing Unit
d. Switch
22. Which cable connects the computer to the network through NIC?
a. USB cable
b. HDMI cable
c. Ethernet cable
d. VGA cable
23. Which device is an eight-pin connector used exclusively with Ethernet cables for
networking?
a. RJ-45
b. USB
c. HDMI
d. VGA
24. Which device is the standard networking interface seen at the end of all network cables?
a. RJ-11
b. RJ-45
c. DB-25
d. PS/2
25. How many pins does an R-J45 connector have?
a. 24
b. 32
c. 8
d. 16
26. Which device is an analog device that works with signals on the cables to which it is
connected?
a. Router
b. Hub
c. Repeater
d. Switch
27. Which device regenerates signals on the cables to which it is connected?
a. Repeater
b. Modem
c. NIC
d. Gateway
28. Which device is used to connect different devices through wires in a network?
a. Repeater
b. Hub
c. Router
d. Modem
b. NIC
c. RJ-45
d. Repeater
30. Which device receives data, analyzes it, and transmits it to other networks?
a. Switch
b. Router
c. Hub
d. Repeater
31. The device can analyze data, decide how it is packaged, and send it to another network is the
a. Hub
b. Switch
c. Router
d. Repeater
32. The device serves as the entry and exit point of a network is the
a. Gateway
b. Switch
c. Hub
d. NIC
33. Which device maintains information about internal and remote network paths?
a. Gateway
b. Router
c. Repeater
d. Modem
34. Which of the following refers to the arrangement of computers and peripherals in a network?
a. Protocol
b. Topology
c. Interface
d. Adapter
35. In which topology is each device connected to every other device in the network?
a. Ring
b. Mesh
c. Star
d. Bus
33. In which topology is each node connected to two other devices, one on each side?
a. Star
b. Ring
c. Mesh
d. Tree
34. The link in a ring topology is:
a. Unidirectional
a. Always wireless
b. Only analog
c. Irregular
35. In which topology does each device connect to a transmission medium?
a. Star
b. Bus
c. Ring
d. Mesh
36. In which topology is each device connected to a central node?
a. Ring
b. Star
c. Bus
d. Mesh
37. In which topology are there multiple branches, each with one or more basic topologies?
a. Mesh
b. Hybrid
c. Ring
d. Bus
38. Which of the following is a hierarchical topology?
a. Tree
b. Ring
c. Bus
d. Mesh
39. Which of the following is a hybrid topology?
a. Star
b. Tree
c. Mesh
d. Star-Bus
c. 128
d. 256
46. Which of the following is an ocean of information stored in trillions of interlinked web pages?
a. Local Area Network
b. World Wide Web
c. Intranet
d. File Server
47. Which of the following is used to design standardized web pages readable across devices?
a. MAC
b. HTML
c. URL
d. DNS
48. Which of the following is a unique address or path for each web resource?
a. MAC
b. HTML
c. URL
d. ISP
49. Which protocol is used to retrieve linked web pages across the web?
a. HTTP
b. FTP
c. SMTP
d. TCP
50. What is the full form of MAC?
a. Media Access Control
b. Machine Address Code
c. Manual Access Configuration
d. Multi Access Channel
51. What is the full form of HTML?
a. Hyper Test Markup Language
b. High Tech Markup Language
c. Hyper Text Markup Language
d. Hyperlink Transfer Markup Language
52. What is the full form of URL?
a. Uniform Resource Locator
b. Universal Reference Link
c. Unified Retrieval Language
10. A disadvantage of mesh topology is high and complex wiring due to many redundant
connections. (cabling cost)
11. In a ring topology each node is connected to other nodes, forming a closed loop. ( two)
12. Data transfer in classical ring topology is ---------- (unidirectional)
13. In bus topology every device connects to a single shared that transmits data in both
directions.(backbone )
17. A tree or hybrid topology is a hierarchical arrangement that connects multiple LANs and combines basic
(topologies)
18. In star topology each device connects to a central device such as a hub or a
.(switch)
19. A major risk in star topology is that failure of the device can lead to complete network
failure. (switch)
20. A tree or hybrid topology is a hierarchical arrangement that connects multiple LANs and combines basic
(topologies)
CHAPTER - 11 DATA COMMUNICATION
1 MARK MCQ’S
1. The exchange of data between two or more connected devices is called
a) Bandwidth b) Data transfer rate
c) Protocol d) Data Communication
2. A Computer or any device which is capable of transferring data over a network is
a) Receiver b) Sender c) Message d) Communication media
3. A Computer or any device which is capable of accept data from the network is
a) Receiver b) Sender c) Message d) Communication media
4. The data or information that needs to be exchanged between the sender and receiver is called
a) Receiver b) Sender c) Message d) Communication media
5. The path through which the message travels between source and destination is called
a) Receiver b) Sender c) Message d) Communication media
6. Set of rules that need to followed by commination parties in order to have successful and reliable
data communication is called as
a) Receiver b) Sender c) Protocol d) Communication media
7. Bandwidth is measured in
a) bps b) Kbps c) Gbps d) Hertz(Hz)
8. MBps stands for
a) Megabyte per second b) Megabit per second
c) Measuring Byte per second d) Measuring Bit per second
9. Which of the following is a one way communication between two devices?
a) Half duplex b) Simplex c) Full duplex d) Half simplex
10. Example of simplex communication mode is
a) Walkie-Talkies b) Mobile c) TV d) Computer
11. Which of the following is a two way communication between two devices but only one device can
send data at a time?
a) Half duplex b) Simplex c) Full duplex d) Half simplex
12. Example of half duplex communication mode is
a) Walkie-Talkies b) Mobile c) TV d) Computer
13. A two way communication in which both devices can send and receive data simultaneously is
called
a) Half duplex b) Simplex c) Full duplex d) Half simplex
14. Example of full duplex communication mode is
a) Walkie-Talkies b) Fan c) TV d) Computer
15. Data is transferred through a physical links or cables is called
a) Guide media b) Unguided media c) Data transfer d) Switching
16. Data is transferred in air through electromagnetic waves is called
a) Guide media b) Unguided media c) Data transfer d) Switching
17. UTP stands for
a) Un twisted pair b) Unit twisted pair
c) Unshielded twisted pair d) Urban twisted pair
18. STP stands for
a) Switching twisted pair b) Shielded twisted pair
c) Soft twisted pair d) Signal twisted pair
19. A short range wireless technology that can be used to connect mobile-phones, mouse, headphones,
keyboards is called
a) LAN b) WAN c) Bluetooth d) Tablet
20. HTTP stands for
a) HeaderText Transfer protocol b) HyperText Transfer Protocol
c) HighText Transfer Protocol d) HomeText Transfer protocol
21. FTP stands for
a) Fibre Transfer protocol b) Fact Transfer Protocol
c) File Transfer Protocol d) Firewall Transfer protocol
22. PPP stands for
a) Point-to Point Protocol b) Protocol-to Point Protocol
c) Peer-to Peer Protocol d) Packet-to Packet Protocol
23. ISP stands for
a) Industry Service Provider b) Intel Service Provider
c) Infrared Service Provider d) Internet Service Provider
24. SMTP stands for
a) Single Mail Transfer Protocol b) Simple Mail Transfer Protocol
c) Service Mail Transfer Protocol d) Set Mail Transfer Protocol
25. TCP/IP stands for
a) Transmission Control Protocol/Internet Protocol
b) Transfer Control Protocol/Internet Protocol
c) Transmit Control Protocol/Internet Protocol
d) Technology Control Protocol/Internet Protocol