Chapter-1
Exception Handling in
Python
I Select the correct answer from the choices given:
1) What is a syntax error in Python? (E)
a) An error related to the logical flow of the program.
b) An error in the logic of the program
c) An error that occurs when the rules of the programming language are not followed.
d) An error that occurs only during runtime.
2) What type of error is raised when you forget to close a parentheses in Python? (D)
a) SyntaxError b) ValueError c) TypeError d) RuntimeError
3) What is another name for a syntax error in programming? (A)
a) Runtime error b) Parsing error c) Logical error d) Exception error
4) What happens when a syntax error is encountered in Python? (D)
a) The program executes
b) The program stops execution until the error is fixed.
c) The program runs slower.
d) The interpreter tries to correct the error automatically.
5) Which of the following is an example of a syntax error in Python? (E)
a) Using a variable without declaring it first.
b) Forgetting to close a parenthesis in a function call.
c) Using the wrong type of operator.
d) Calling a function with the wrong number of arguments.
6) How does Python handle a program with a syntax error?(A)
a) Python shows a warning but continues execution.
b) Python shows an error message and stops execution until the error is fixed.
c) Python prompt user to correct interactively
d) Python ignores the error and runs the program.
7) Identify the error the following programming
segment(E) If marks >20 :
print “Good Score”
a) RuntimeError b) LogicalError c) KeyboardError d) SyntaxError
8) Which exception is raised when not followed rules of Python language? (E)
a) IndentationError b) SyntaxError c) NameError d) ValueError
9) Which of the following is a valid example of a syntax error in Python? (E)
a) print(“Hello World) b) if x = 5:
SUBJECT: 41 COMPUTER SCIENCE Page 1 of 81
c) def my function(): d) All of these
SUBJECT: 41 COMPUTER SCIENCE Page 2 of 81
10) In the following Python code, what is the syntax error?
(A) if x = = 10
print(“x is 10”)
a) The colon (:) is missing before the print statement.
b) The condition has a missing parentheses.
c) The colon (:) is missing after the if condition.
d) The colon (:) is missing after the print statement.
11) What is an exception in programming? (E)
a) A type of error that occurs during the execution of a program
b) A warning message displayed atafter execution.
c) A successful execution of a conditional statement
d) A special type of loop in programming
12) What is an exception in Python?(E)
a) A Python object that represents a successful program execution
b) A Python object that represents an error
c) A built-in function used for debugging
d) A type of variable in Python
13) What happens when an error occurs during the execution of a Python program?(E)
a) The program continues executing as normal
b) it automatically recompile the program
c) An exception is raised
d) The program runs a default error message and continues
14) Why should exceptions be handled in Python?(E)
a) To ensure that errors are ignored
b) To make the program run faster
c) To prevent the program from terminating abnormally
d) To execute the program without error.
15) What does the keyword do in an exception block ?(A)
a) It raises the exception.
b) It assigns the exception object to a variable.
c) It catches the exception and terminate the program
d) It creates a custom except for class
16) What is the effect of using try-except blocks in Python? (A)
a) It prevents the program from terminating abruptly.
b) It helps in performing automatic type casting.
c) It can only handle syntax errors.
SUBJECT: 41 COMPUTER SCIENCE Page 3 of 81
d) It optimizes the program execution speed.
17) What type of error does Python raise when a function receives an argument of the correct type but
inappropriate value? (E)
a) KeyboardInterrupt
b) ValueError
c) TypeError
d) NameError
18) Which exception is raised when the file specified in a program statement cannot be opened ? (E)
a) IOError b) EOFError c)IndexError d) Value error
19) Which exception is raised when the requested module definition is not found ?(E)
a) FileNotFoundError b) ImportError c) SyntaxError d) Module Not Found
20) Which exception is raised when the end of file condition is reached without reading any data by
input()?(E)
a) EOF error b) Import Error c) Syntax error d) Value error
21) Which exception is raised when a division by zero operation is performed?(E)
a) ZeroError b) TypeError c) DivisionError d)ZeroDivisionError
22) Which exception is raised when an index is out of range in a sequence?(E)
a) KeyError b) ValueError c) IndexError d) TypeError
23) Which exception is raised when a local or global variable name is not defined? (E)
a) Import Error b) NameError c) Syntax error d) Value Error
24) Which exception is raised due to incorrect indentation in the program code ? (E)
a) ImportError b)AssertionError c) IndexError d) IndentationError
25) Which exception is raised when an operation or function is applied to an object of inappropriate data
type? (E)
a) TypeError b) NameError c) OverflowError d) SyntaxError
26) Which built-in exception is raised when a file is not found? (E)
a) FileNotFoundError b) IOError c) NameError d) TypeError
27) What is the purpose of the raise statement in Python?(E)
a) To raise the program’s execution to a higher point in the code.
b) To terminate the program
c) It can be used to throw an exception.
d) To end the program execution.
28) Which of the following is the correct syntax for raising an exception in Python? (A)
a) throw Exception(‘Error message’) b) raise Exception(‘optional argument’)
c) raise ‘Error message’ d) raise exception(‘Error message’)
SUBJECT: 41 COMPUTER SCIENCE Page 4 of 81
29) What is the primary purpose of the assert statement in Python? (E)
a) To catch exceptions during program execution.
b) To define functions for debugging.
c) To test if a condition is true and raise an exception if it is false.
d) To handle errors in user input.
30) Which statement is used in python to raise an exception manually ? (E)
a) assert b) raise c) throw d) catch
31) Which of the following is the correct syntax for using an assert statement? (D)
a) assert condition: b) assert expression[arguments]
c) assert(condition) d) assert: condition
32) What type of exception is raised when an assertion fails in Python? (E)
a) TypeError b) ValueError c) IndexError d) AssertionError
33) What is the primary purpose of exception handling in programming? (E)
a) To make the code run faster b) To manage runtime errors gracefully
c) To make code more complex d) To reduce the size of the program
34) What is the main reason for using exception handling in programming? (A)
a) To automatically fix errors
b) To manage unexpected errors and maintain program flow
c) To prevent syntax errors
d) To terminate program abruptly
35) What does the Python interpreter do when an error occurs during program execution? (E)
a) It stops the program without any notification b) It creates an exception object
c) It deletes all variables d) It restarts the program
36) What is the process called when an exception object is created and handed over to the runtime system
for handling? (E)
a) Handling an exception b) Catching an exception
c) Throwing an exception d) Ignoring an exception
37) What does the runtime system search for when an exception is raised? (E)
a) The variable that caused the exception
b) The source code file where the exception occurred
c) A block of code called the exception handler that can handle the exception
d) The compiler directives related to the exception
38) What is the name of the block of code that handles exceptions raised during program execution? (E)
a) Error block b) Catch block
c) Exception handler d) Runtime block
SUBJECT: 41 COMPUTER SCIENCE Page 5 of 81
39) Which of the following statements is true about using multiple except blocks in Python? (E)
a) Only one except block is allowed per try block.
b) Multiple except blocks can be used to handle different exceptions separately.
c) Multiple except blocks can be used, but only the last one is executed.
d) All except blocks are executed in sequence when an error occurs.
40) What will happen if an exception is raised inside the else block of a try-except-else structure? (A)
a) The exception will be caught by the except block.
b) The program will terminate immediately.
c) The exception will be ignored, and the code will continue execution.
d) The exception will not be caught and will propagate outside the block.
41) Which of the following is true about the else block in Python exception handling? (E)
a) It is executed if an exception is raised in the try block
b) It is executed only if no exception occurs in the try block
c) It is always executed, regardless of exceptions
d) it is used to define an alternate block
42) Which Python keyword is used to handle exceptions? (E)
a) finally b) identifier c) catches d) except
43) Which of the following keywords are not specific to exception handling? (D)
a) Try b) except c) else d) finally
44) What will happen if a try block contains a raise statement but there is no corresponding except block?
(A)
a) The program will ignore the raised exception and continue.
b) The program will terminate with a traceback error.
c) The program will automatically catch the exception and continue.
d) The program will raise a new exception automatically.
45) What happens if an exception is raised inside a try block, but no except block is present to catch it?
a) It call the else block (E)
b) The program terminates with an error
c) The exception is caught by the raise statement
d) The program moves to the else block
46) What is the purpose of the else block in a try-except-else statement? (E)
a) To handle exceptions that occur in the try block.
b) To run code when no exception occurs in the try block.
c) To execute code after the exception is raised.
d) To finalize code after all exceptions are handled.
SUBJECT: 41 COMPUTER SCIENCE Page 6 of 81
47) Which of the following is used to handle exceptions in Python?(E)
a) catch b) exception c) try - except d) throw
48) In which block is the exception actually thrown? (E)
a) try b) catch c) finally d) exception
49) What will happen if an exception is raised but not caught in a try-except block? (A)
a) The program will continue without interruption.
b) The program will terminate and display the traceback.
c) The program will ignore the exception and continue execution.
d) The program will prompt the user to handle the exception.
50) Which of the following will be executed if an exception is thrown and not caught? (A)
a) The program terminates immediately b) The else block executes
c) The finally block executes d) Program continuous with next statement
51) Which of the following statements about the finally block is true? (E)
a) It will be executed only if an exception is raised.
b) It will not be executed if an exception is raised.
c) It will be executed whether or not an exception is raised.
d) It will not be executed if there is no exception.
52) Which of the following is true about exception handling? (E)
a) It is only useful for debugging purposes
b) It makes the program slower by introducing additional checks
c) It allows the program to continue execution even when an error occurs
d) It is not necessary in programs with few errors
53) What is the purpose of a finally block in exception handling? (E)
a) It is used to define the exception
b)It always executes, regardless of whether an exception was thrown or not
c) It prevents the exception from being thrown
d) It rethrows the exception after handling
54) What is the role of the finally block in exception handling? (A)
a) To execute code after the exception is caught, regardless of whether an exception occurred
b) To throw exceptions
c) To catch exceptions d) To terminate the program
55) What is the primary purpose of the finally clause in Python? (A)
a) To handle specific exceptions b) To catch all exceptions automatically
c) To ensure that code runs regardless of whether an exception occurs
d) To define the starting point of the program
56) What happens if an exception is raised in the finally block? (E)
SUBJECT: 41 COMPUTER SCIENCE Page 7 of 81
a) The exception is ignored. b) The exception is logged for further analysis.
c) The exception is re-raised and the program terminates.
d) The exception is caught in the except block.
57) Which keyword is used to raise (throw) an exception in Python? (E)
a) catch b) throw c) raise d) except
58) What happens when an exception is raised in Python? (E)
a) The program immediately terminates b) The exception is passed silently
c) The exception is propagated and can be caught in a try-except block
d) The program prints a debug message and continues execution
59) Which of the following statements is true about the raise keyword? (E)
a) It can only be used within a function
b) It can be used to throw both predefined and custom exceptions
c) It is used to handle exceptions d) It is used to catch exceptions
60) If an exception is raised and not caught within the current function, what happens? (E)
a) The program terminates immediately
b) The exception is passed to the next function call in the call stack
c) The exception is silently ignored d) The program automatically corrects the error
61) Assertion (A): Zero Division Error is raised when a number is divided by zero. (D)
Reason (R): Division by zero is undefined in mathematics and therefore not allowed in Python.
a) Both A and R are true, but R is not the correct explanation of A
b) A is true, but R is false c) A is false, but R is true
d) Both A and R are true, and R is the correct explanation of A
62) Assertion(A):TypeError is raised when an operator is supplied with a value of incorrect data type.
Reason (R): Trying to concatenate a string and an integer without conversion causes a TypeError.
a) Both A and R are true, and R is the correct explanation of A (D)
b) Both A and R are true, but R is not the correct explanation of A
c) A is true, but R is false d) A is false, but R is true
63) Assertion (A): ValueError is raised when a function receives a value of the correct data type but
inappropriate value.
Reason (R): Converting a non-numeric string to an integer using int("abc") raises a ValueError. (D)
a) Both A and R are true, and R is the correct explanation of A
b) Both A and R are true, but R is not the correct explanation of A
c) A is true, but R is false d) A is false, but R is true
64) Assertion (A):IndexError occurs when trying to access an index that is out of the range of a list.
Reason (R): Lists in Python start indexing from 1. (D)
a) Both A and R are true, and R is the correct explanation of A)
SUBJECT: 41 COMPUTER SCIENCE Page 8 of 81
b) Both A and R are true, but R is not the correct explanation of A)
c) A is true, but R is false. d) A is false, but R is true.
65) Assertion (A): Each time an error is detected in a program, the Python interpreter raises an
exception. Reason (R): Exception handlers are designed to execute when a specific exception is
raised. (D)
a) Both A and R are true, and R is the correct explanation of A.
b) Both A and R are true, but R is not the correct explanation of A.
c) A is true, but R is false. d) A is false, but R is true.
66) Assertion (A): Programmers can only raise exceptions using the raise statement in Python.
Reason (R): The assert statement can also be used to forcefully raise exceptions in Python. (D)
a) Both A and R are true, and R is the correct explanation of A.
b) Both A and R are true, but R is not the correct explanation of A.
c) A is false, but R is true. d) A is true, but R is false.
67) Assertion (A): The raise statement can be used to throw an exception in Python.
Reason (R): The raise statement is used only for handling exceptions that are caught by the try-except
block. (D)
a) Both A and R are true, and R is the correct explanation of A.
b) Both A and R are true, but R is not the correct explanation of A.
c) A is true, but R is false. d) A is false, but R is true.
68) Assertion (A): An assert statement in Python is used to test an expression in the program code. If the
result is false, an AssertionError is raised.
Reason (R): The assert statement is generally used at the beginning of a function or after a function
call to check for valid input. (D)
a) Both Assertion and Reason are true, and Reason is the correct explanation of Assertion.
b) Both Assertion and Reason are true, but Reason is not the correct explanation of Assertion.
c) Assertion is true, but Reason is false. d) Assertion is false, but Reason is true.
69) Assertion (A):Each and every exception has to be handled by the programmer to avoid the program
from crashing abruptly.
Reason (R): This is done by writing additional code in a program to give proper messages (D)
a) Both A and R are true, and R is the correct explanation of A.
b) Both A and R are true, but R is not the correct explanation of A.
c) A is true, but R is false. d) A is false, but R is true.
70) Assertion (A): In Python, the else block in a try...except...else construct is executed only when no
exception is raised in the try block.
Reason (R): The except block runs only if an exception occurs in the try block; otherwise, the control
moves to the else block if it exists. (D)
SUBJECT: 41 COMPUTER SCIENCE Page 9 of 81
a) Both A and R are true, and R is the correct explanation of A
SUBJECT: 41 COMPUTER SCIENCE Page 10 of 81
b) Both A and R are true, but R is not the correct explanation of A
c) A is true, but R is false
d) A is false, but R is true
CHAPTER-2
FILE HANDLING IN PYTHON
I Select the correct answer from the choices given:
1) The files are stored permanently in a computer system on (E)
a) Random Access Memory b) Cache Memory
SUBJECT: 41 COMPUTER SCIENCE Page 11 of 81
c) CPU d)Secondary storage media
2) Which of the following file extensions is used for plain text files? (A)
a) .exe b) .txt c) .jpg d) .mp3
3) The following device is used to store data permanently entered in Python program (E)
a) Primary storage b) Non-volatile Memory
c) Temporary storage d) Secondary storage devices
4) Which of the following is data file ? (E)
a) computer file b) meta file c)image file d) text file and binary file
5) Computers store every file as a collection of (E)
a) 0’s and 1’s b) 0’s and 2’s c) 0’s and 9’s d) ASCII
6) Each line of a text file is terminated by a special character (D)
a) EOS b) EOP
c) EOF d) EOL
7) Document created in notepad is an example of (A)
a) Text file b) Binary file c) Word file d) system file
8) The default EOL character in Python is (A)
a) \k b) \v c) \b d) \n
9) What is the primary purpose of file handling in Python? (E)
a) To process data faster b) To store data temporarily
c) To permanently store data and output for reuse
d) To display output on the screen
10) The following file can be understood as a sequence of characters consisting of alphabets, numbers and
other special symbols. (E)
a) Text file b) binary file c) numeric file d) alphabets file
11) What happens if you try to open a binary file in a text editor? (E)
a) The text editor will display the file’s content in ASCII format.
b) The text editor will show the file as a series of 0s and 1s.
c) The text editor will display garbage values.
d) The text editor will read the file successfully if it is an image.
12) Which of the following is the correct syntax to open a file in Python? (D)
a) fobj=open(“filename”, accessmode) : b) fileobj = open(filename, accessmode)
c) open=file(“[Link]”, “accessmode”) d) [Link](“filename”)
13) What type of software is required to view or modify the contents of a binary file? (D)
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)
SUBJECT: 41 COMPUTER SCIENCE Page 12 of 81
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)
a) [Link]() b) open() c) openfile() d) write()
16) How are binary files stored in a computer? (E)
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? (E)
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? (E)
a) r b) w b) r+ d) a
19) Which mode is used to Opens the file in read-only mode in python ? (E)
a) <r+> b) <w> c) <a> d) <r>
20) Which mode is used to Opens the file in binary and read-only mode ? (A)
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)
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? (E)
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? (E)
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? (E)
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? (E)
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
SUBJECT: 41 COMPUTER SCIENCE Page 13 of 81
existing content? (A)
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)
a) <r> b><w+> c) <r+> d) <a+>
28) What is the purpose of the close() function in Python file handling? (E)
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? (E)
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? (E)
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)
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? (D)
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 ? (E)
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)
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. (E)
a) write() b) writing() c) writestring() d) writelines()
36) What does the read() method do in Python? (E)
a) It reads only the firse 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? (E)
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 Correct Answer: C. It reads the entire file
38) What does the readlines() method do in Python? (E)
a) Reads the entire file as a single string
SUBJECT: 41 COMPUTER SCIENCE Page 14 of 81
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? (E)
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)
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()? (E)
a) seek() b) open() c) read() d) close()
42) What will happen if you call writelines() on an empty list? (A)
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? (E)
a) [Link]() b) [Link]() c) [Link]() d) [Link]()
44) What is the primary purpose of Pickle in Python? (E)
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? (E)
a) json b) pickle c) os d) sys
46) Which of the following types of objects can be serialized using Pickle? (E)
a) Lists b) Tuples c) Dictionaries d) All of these
47) What is the primary purpose of the dump() method in Python? (E)
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? (E)
a) pickle b) json c) marshal d) os
49) In which case would you need to use the dump() method? (E)
SUBJECT: 41 COMPUTER SCIENCE Page 15 of 81
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? (D)
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)
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)
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? (E)
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)
a) Serialization b) Deserialization c) Encryption d) Compression
55) What does the flush() method do when used with file handling in programming? (E)
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
II Fill in the blanks
1) Secondary storage media are used to permanently store data for later access in (Solid State Drive)
2) A file is a named location on storage media where data is permanently stored. (Secondary)
3) A text file consists of readable characters. (human)
4) Text files store data using bytes for schemes. (ASCII)
5) The system frees the memory allocated to it using the method. (close())
6) The method is used to read a specified number of bytes of data from a data file. (read())
7) The method reads all the lines and returns the lines along with newline character as a list of
strings. (readlines())
8) The method reads one complete line from a file. (readline())
9) Each program is stored on the secondary device as a (file)
10) Each line of a text file is terminated by a special character, called End of Line (EOL).
SUBJECT: 41 COMPUTER SCIENCE Page 16 of 81
11) The method writes a single string to a file. (write)
12) The method writes multiple strings to a file. (writelines)
13) The default End of line character is python is (\n)
14) The Python function used to open a file for writing data is . (open())
15) The write() method is used to write a to a file in Python. (string)
16) The writelines() method is used to write strings to a file (multiple)
17) To serialize and deserialize Python objects is used module. (pickle)
18) To convert (pickle) Python objects for writing data to a binary file, the method is used.
(dump())
19) To load (unpickling) data from a binary file, the method is used (load)
20) The method is used to return the current position of the file pointer in Python. (tell())
21) The method is used to position the file object at a particular position in a file. (seek())
22) To create a text file, we use the method (open())
23) To clear the buffer and write the contents to the file, we use the method (flush())
SUBJECT: 41 COMPUTER SCIENCE Page 17 of 81
CHAPTER-3
STACKS
1. A mechanism to store, organize and access data along with operations that can be efficiently
performed on the data is (E)
a) datatype b) data structure c) data list d) data collection
2. Which of the following an example of a data structure? (A)
a) print b) string c) function d) for loop
3. What type of data structure is string? (A)
a) It contains sequence of characters
b) It contains sequence of integers
c) It is non linear data structure
d) It contains elements with mixed datatype.
4. A data structure that contains sequence of elements where each character is (E)
a) int b) float c) list d) string
5. A sequence data structure in which each element may be of different types is (E)
a) int b) float c) list d) string
6. LIFO stands for (E)
a) Last in Front Out
b) Left In First Out
c) Last In First Out
d) Last In Forward Out
7. Which data structure follows Last-In-First-Out principle? (E)
a) Queue b) Stack c)Deque d) integer
8. The principle of stack is (E)
a) FILO b) LILO c) FIFO d)LIFO
9. Stack implements which of the following arrangement (E)
a) FILO b) LILO c) FIFO d) LIFO
10. Which of the following is the application uses LIFO principle (A)
a) Confirmation of train ticket is in waiting list
b) Calling customer service centre through IVRS, waiting till a support person is available
SUBJECT: 41 COMPUTER SCIENCE Page 18 of 81
c) Sending print commands from multiple files using shared printer.
d) Bangles worn on wrist
11. Which of the following statement is correct about stack? (D)
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)
a) Stack is a linear data structure
b) Stack does not follow LIFO rule
c) PUSH operation may result into overflow condition
d) Stack is used to reverse a string
13. The arrangement of elements in linear order where adding new elements or removal of existing
elements take place from the same end (E)
a) Stack b) Queue c) Deque d) Deck
14. In stack data structure, from which end does addition of new elements and removal of existing
elements take place? (E)
a) END b) TOP c) REAR d) TAIL
15. The fundamental operations performed on the stack are (D)
a) insert,delete b) push,pop c) push,delete d) insert,pop
16. Which operation adds a new element to the TOP of the stack? (E)
a) Push b) Pop c) Peek d) insert
17. Addition of new element at the TOP of the stack is called (E)
a) Push b) Peek c) Pop d) overflow
18. Which operation is used to remove an element from the Top of the stack? (E)
a) Push b) Pop c) Peek d) Is Empty
19. Removal of existing element from TOP of the stack is called as (E)
a) push b) peek c) pop d) overflow
20. Trying to add an element to a full stack results in which exception? (A)
a) overflow b) underflow c) peek d) empty stack
21. Trying to delete an element from an empty stack results in an exception called (A)
SUBJECT: 41 COMPUTER SCIENCE Page 19 of 81
a) overflow b) peek c) underflow d) full stack
22. Which exception will occur when trying to add an element to a full stack? (A)
a) overflow b) underflow c) peek d) empty stack
23. Which exception will occur when trying to remove an existing element from an
empty stack? (A)
a) overflow b) underflow c) peek d) full stack
24. Which datatype is used to implement stack in python? (D)
a) string b) int c) float d) list
25. Which built-in method is used to insert a new element to Top of the stack in python? (D)
a) insert b) add c) append insert
26. Which built-in method is used to remove an existing element from the stack in python? (A)
a) pop b) delete c) free d) remove
27. Which of the following operation can result in stack overflow exception? (D)
a) Trying to add an element to a full stack
b) Trying to add an element to an empty stack
c) Trying to delete an element from an empty stack
d) Trying to delete an element from full stack
28. Which of the following operation can result in stack underflow exception? (D)
a) Trying to add an element to a full stack
b) Trying to add an element to an empty stack
c) Trying to delete an element from an empty stack
d) Trying to delete an element from a full stack
29. In which condition, stack overflow exception occurs? (D)
a) Stack is full and append() is called
b) Stack is empty and append() is called
c) Stack is full and pop() is called
d) Stack is empty and pop() is called
30. In which condition stack underflow exception occurs? (D)
a) Stack is full and append() is called
SUBJECT: 41 COMPUTER SCIENCE Page 20 of 81
b) Stack is empty and append() is called
c) Stack is full and pop() is called
d) Stack is empty and pop() is called
31. If elements 10, 20,30,40 are inserted to the stack ,Which is the correct order
in which elements are popped? (A)
a) 10,20,30,40 b) 20, 30,40,10 c) 30,40,10,20 d) 40,30,20,10
32. Which data structure is used to convert an expression in postfix notation? (E)
a) queue b) stack c) deque d) string
33. Which built-in methods are used for implementing stack data structure in python? (D)
a) push,pop b) insert,delete c) append,pop d) append,remove
34. Who introduced a different way of representing arithmetic expression called polish
notation? (E)
a) Charles Babbage b) Dennis Richtie c) Ken Thompson d) Jan Lukasiewicz
35. Multiple chairs in a vertical pile is an application of which data structure? (A)
a) Stack b) Queue c) String d) List
36. Which data structure is used to convert an infix expression to postfix? (E)
a) Stack b) Queue c) String d) List
37. Which data structure is used to handle matching of parentheses in arithmetic expression? (A)
a) Stack b) Queue c) String d) List
38. Which data structure is used to convert an infix expression to postfix or
prefix expression? (E)
a) Stack b) Queue c) String d) List
39. Which rule is used to evaluate an infix expression? (A)
a) BODMAS b) FIFO c) LIFO d) LILO
40. In which notation operators are written before their operands? (A)
a) infix b) polish c) reverse polish d) postfix
41. The other name of prefix notation is (E)
a) infix notation b) suffix notation
c) polish notation d) reverse polish notation
SUBJECT: 41 COMPUTER SCIENCE Page 21 of 81
42. The other name of postfix notation is (E)
a) infix notation b) polish notation
c) reverse polish notation d) suffix notation
43. The other name of polish notation is (E)
a) infix notation b) prefix notation
c) postfix notation d) suffix notation
44. The other name of reverse polish notation is (E)
a) infix notation b) polish notation
c) reverse polish notation d) suffix notation
45. X+Y, Which representation is followed in the given expression (E)
a) infix b) postfix c) polish d) prefix
46. The prefix notation of x+y is (A)
a) xy+ b) (x+y) c) +xy d) (xy+)
47. The postfix notation of x*y is (A)
a) xy* b)(*xy) c) *xy d) (x*y)
48. Evaluate the following postfix expression and find the result of 78*+2 (D)
a) 56 b) 112 c) 23 d) 65
49. Assertion(A): Stack follows the Last-In-First-Out (D)
Reason (R): The new element is added and an existing element is removed from the same end
a) A is true, R is correct reason
b) A is true, R is not correct reason
c) A is false, R is correct reason
d) A is false, R is not correct reason
50. Assertion(A): Stack follows the FIFO order (D)
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
b) A is true, R is not correct reason
c) A is false, R is correct reason
d) A is false, R is not correct reason
SUBJECT: 41 COMPUTER SCIENCE Page 22 of 81
51. Assertion(A): Stack follows the First-In-First-Out principle (D)
Reason (R): The new element is added and an existing element is removed from the same end
a) A is true, R is correct reason
b) A is true, R is not correct reason
c) A is false, R is correct reason
d) A is false, R is not correct reason
52. Assertion(A):Stack data structure is used to reverse a string (D)
Reason(R): The principle of stack is LIFO
a) A is true, R is correct reason
b) A is true, R is not correct reason
c) A is false, R is correct reason
d) A is false, R is not correct reason
53. Assertion(A): Stack data structure is used to reverse a string (D)
Reason (R): The new element is added and an existing element is removed from the same end
a) A is true, R is correct reason
b) A is true, R is not correct reason
c) A is false, R is correct reason
d) A is false, R is not correct reason
54. Assertion(A):Stack data structure is used to reverse a string (D)
Reason(R): The principle of stack is FIFO
a) A is true, R is correct reason
b) A is true, R is not correct reason
c) A is false, R is correct reason
d) A is false, R is not correct reason
55. Assertion(A):Stack data structure is used to redo/undo editing of text /image in text / image editor
(D)
Reason(R): The principle of stack is FIFO
a) A is true, R is correct reason
b) A is true, R is not correct reason
SUBJECT: 41 COMPUTER SCIENCE Page 23 of 81
c) A is false, R is correct reason
d) A is false, R is not correct reason
56. Assertion(A): Stack data structure is used to redo/undo editing of text/image in text / image editor
(D)
Reason(R): The principle of stack is LIFO
a) A is true, R is correct reason
b) A is true, R is not correct reason
c) A is false, R is correct reason
d) A is false, R is not correct reason
57. Assertion(A): Stack data structure is used to maintain the history of browsed pages (D)
Reason(R): The principle of stack is LIFO
a) A is true, R is correct reason
b) A is true, R is not correct reason
c) A is false, R is correct reason
d) A is false, R is not correct reason
58. Assertion(A): Stack data structure is used to maintain the history of browsed pages (D)
Reason(R): The principle of stack is FIFO
a) A is true, R is correct reason
b) A is true, R is not correct reason
c) A is false, R is correct reason
d) A is false, R is not correct reason
59. Assertion(A): Stack follows LIFO rule (D)
Reason(R): Insertion and deletion takes place at different ends.
a) A is true, R is correct reason
b) A is true, R is not correct reason
c) A is false, R is correct reason
d) A is false, R is not correct reason
60. Assertion(A): Stack data structure is used in accessing link of the last visited webpage. (D)
Reason(R):The ordering principle is FIFO
a) A is true, R is correct reason
SUBJECT: 41 COMPUTER SCIENCE Page 24 of 81
b) A is true, R is not correct reason
c) A is false, R is correct reason
d) A is false, R is not correct reason
61. Assertion(A):append() and pop() built-in methods are used in python implementation of stack.
(D)
Reason(R): Stack is linear arrangement of elements where insertion and deletion takes place at the
same end.
a) A is true, R is correct reason
b) A is true, R is not correct reason
c) A is false, R is correct reason
d) A is false, R is not correct reason
CHAPTER - 4.
QUEUE
SUBJECT: 41 COMPUTER SCIENCE Page 25 of 81
1- Mark Questions(MCQs)
1. Which of the following is an ordered linear list of elements having different ends for
adding and removing elements in it? (E)
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 (E)
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. (E)
a) Stack b) Queue c) Searching d) Sorting
4. What is the working principle of queue? (E)
a) LIFO b) FIFO c) FILO d) LILO
5. With respect to queue data structure which of the below statement is true? (A)
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? (D)
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)
a) Stack b) Queue c) Searching d) Sorting
8. In which order elements of queue are accessed? (A)
a) LIFO b) FIFO c) LILO d) FILO
9. Queue follows: (E)
a) LIFO principle b) FIFO principle c) LILO principle d) FILO principle
10. FIFO stands for: (E)
a) First -In-First-Out b) Forward -In-First-out
c) First -In-Forward-out d) Forward -In- Forward -out
11. FCFS stands for: (E)
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: (E)
SUBJECT: 41 COMPUTER SCIENCE Page 26 of 81
a) FCFS b) LIFO c) FSFC d) FILO
13. At which end, an element can be inserted in queue? (E)
a) Top b) Peek c) Rear d)
Front
14. From which end, an element is deleted from queue? (E)
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? (D)
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? (E)
a) Enqueue b) Dequeue c) Isempty d) Peek
[Link] exception will occur when inserting elements beyond capacity of
the queue? (A)
a) Underflow b) Overflow c) Dequeue d) Enqueue
[Link] operation is used to remove one element at a time from the
front of the queue? (E)
a) Enqueue b) Dequeue c) Isempty d) Peek
[Link] exception will occur when trying to delete an element from
an empty queue? (A)
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)
a) Enqueue b) Dequeue c) Isempty d) Peek
21. Which operation is
used to check whether the queue has any element or not? (A)
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? (D)
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? (D)
a) Enqueue b) Isfull c) Isempty d) Peek
24. Which operation is used to avoid overflow
exceptions while performing enqueue operation? (D)
SUBJECT: 41 COMPUTER SCIENCE Page 27 of 81
a) Enqueue b) Isfull c) Isempty d) Peek
SUBJECT: 41 COMPUTER SCIENCE Page 28 of 81
25. Which operation is used to avoid underflow
exception while performing dequeue operation? (D)
a) Enqueue b) Isfull c) Isempty d) Peek
26. Which function always adds
an element to the rear end of the queue? (E)
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?(D)
a) 1 b) 0 c) n d) n-1
28. Which
data type is used to implement a queue in Python? (D)
a) Tuple b) Dictionary c) List d) None
29. Which built-in-function (method) is
used to create an empty queue? (E)
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? (E)
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? (E)
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? (E)
a) isEmpty( ) b) list( ) c) append( ) d) len( )
[Link] built-in-function (method) is used to find the number of elements
in the queue? (E)
a) Enqueue( ) b) isEmpty( ) c) isFull( ) d) len( )
34. In which condition, queue overflow occurs? (A)
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)
a) Queue is full and Enqueue( ) is called.
b) Queue is empty and Enqueue ( ) is called.
c) Queue is full and Dequeue( ) is called.
SUBJECT: 41 COMPUTER SCIENCE Page 29 of 81
d) Queue is empty and Dequeue ( ) is called.
36. Deque is a version of queue which
allows insertion and deletion at (E)
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? (E)
SUBJECT: 41 COMPUTER SCIENCE Page 30 of 81
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? (E)
a) Enqueue b) Dequeue c) Deque d) Queue
39. Which of the following
permits insertion and deletion operations from any end? (E)
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)
a) Enqueue b) Dequeue c) Deque d) Queue
41. Which of the following is also known
as double ended queue? (E)
a) Enqueue b) Dequeue c) Deque d) Queue
42. Identify the not correct statement about Deque
(D)
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? (E)
a) Enqueue b) Dequeue c) Insertrear d) Insertfront
44. Which operation is
used to insert a new element at the rear of the deque? (E)
a) Enqueue b) Dequeue c) Insertrear d) Insertfront
45. Which operation is
used to remove an element from the front of the deque? (E)
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? (E)
a) Enqueue b) Dequeue c) Deletionrear d) Deletionfront
47. Which built-in-function
(method) is used to create an empty deque? (E)
a) Enqueue( ) b) list( ) c) append( ) d) insert( )
48. Which built-in-
SUBJECT: 41 COMPUTER SCIENCE Page 31 of 81
function (method) is used to insert an element at the front of deque? (A)
a) Enqueue( ) b) list( ) c) Insertrear( ) d) insert( )
49. Which operation is used to
check the presence of element(s) in deque? (A)
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)
a) Getfront b) Insertfront c) Deletionrear d) Peek
SUBJECT: 41 COMPUTER SCIENCE Page 32 of 81
51. Which operation is used to read value from the rear of the
deque, without removing it from the deque? (A)
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 (D)
a) Queue b) Stack c) List d) String
53. Assertion(A):Customers forming a line at the cash counter in a bank is
an example of queue in everyday life (D)
Reason(R):The ordering principle of queue is LIFO
a) A is true, R is correct reason
b) A is true, R is not correct reason
c) A is false, R is correct reason
d) A is false, R is not correct reason
54. Assertion(A): Customers forming a line at the
cash counter in a bank is an example of queue in everyday life (D)
Reason(R): The ordering principle of queue is FIFO
a) A is true, R is correct reason
b) A is true, R is not correct reason
c) A is false, R is correct reason
d) A is false, R is not correct reason
55. Assertion(A): Queue is a non linear data structure
Reason(R): Insertion and deletion takes place at same end (D)
a) A is true, R is correct reason
b) A is true, R is not correct reason
c) A is false, R is correct reason
d) A is false, R is also false
56. Assertion(A):Queue is used to send print commands using a shared
printer Reason(R):The ordering principle of queue is FCFS (D)
a) A is true, R is correct reason
b) A is true, R is not correct reason
c) A is false, R is correct reason
d) A is false, R is not correct reason
57. Assertion(A):Queue is used to send print commands using a shared
printer Reason(R):The ordering principle of queue is LIFO (D)
a) A is true, R is correct reason
SUBJECT: 41 COMPUTER SCIENCE Page 33 of 81
b) A is true, R is not correct reason
c) A is false, R is correct reason
d) A is false, R is not correct reason
58. Assertion(A):Deque is also known as Double ended queue (D)
Reason(R):Deque allows insertion, deletion operation from any end
a) A is true, R is correct reason
b) A is true, R is not correct reason
c) A is false, R is correct reason
d) A is false, R is not correct reason
59. Assertion(A):Queue is also known as Double ended queue (D)
Reason(R):Queue allows insertion, deletion operation from any end
a) A is true, R is correct reason
b) A is true, R is not correct reason
c) A is false, R is correct reason
d) A is false, R is not correct reason
CHAPTER - 5 SORTING
SUBJECT: 41 COMPUTER SCIENCE Page 34 of 81
I Select the correct answer from the choices given:
1) Arranging elements of a data structure in ascending or descending order is known as (E)
a) Searching b) Hashing c) Sorting d) Collision
2) What is the primary purpose of sorting in programming? (E)
a) To remove duplicates from a list
b) To order or arrange elements in a particular order
c) To print the elements sequentially
d) To find the maximum or minimum element in a list
3) Which Python function is used to sort a list in ascending order? (E)
a) order() b) sort() c) ascending() d) arrange()
4) In Bubble Sort, after each pass, what happens to the largest element in the list? (E)
a) It moves to the first position b) It moves to the middle of the list
c) It moves to the last position d) It is removed from the list
5) In bubble sort while sorting in ascending order, which element reaches its correct position after the
first pass. (E)
a) The smallest element b) The middle element
c) The largest element d) The second largest element
6) How many passes does Bubble Sort make to sort a list of n elements? (E)
a) no passes b) n + 2 passes c) n - 1 passes d) log(n) passes
7) Which sorting algorithm repeatedly compares adjacent elements and swaps them if they are
unordered? (E)
a) Quick Sort b) Merge Sort c) Insertion Sort d) Bubble Sort
8) How does Bubble Sort work to sort the elements of a list? (E)
a) By repeatedly selecting the smallest element and placing it at the beginning
b) By repeatedly comparing adjacent elements and swapping them if unordered
c) By dividing the list into sublists and sorting each sublist
d) By selecting the largest element and placing it at the beginning
9) In the selection sort algorithm, what does the left list contain during the sorting process? (A)
a) All unsorted elements b) The largest element found
c) The element is not found d) The smallest elements found
10) The smallest (or largest) element from the unsorted part is swapped with the first unsorted element in
(E)
a) Selection Sort b) Bubble Sort c) Shell Sort d) Quick Sort
11) The minimum element is swapped with the first unsorted element in (E)
a) Selection Sort b) Bubble Sort c) Shell Sort d) Quick Sort
12) How does the size of the unsorted list change after each pass in the selection sort algorithm described?
SUBJECT: 41 COMPUTER SCIENCE Page 35 of 81
(A)
a) It increases by one b) It stays the same. c) It decreases by one d) It is halved.
13) How is Insertion Sort similar to Selection Sort? (D)
a) Both algorithms divide the list into sorted and unsorted parts
b) Both algorithms swap elements multiple times
c) Both algorithms sort them individually
d) Both algorithms use a divide-and-conquer approach
14) Which sorting technique is best suited if elements are already sorted? (A)
a) Bubble sort b) Selection sort c) Insertion sort d) Quick sort
15) What does the time complexity of an algorithm represent? (E)
a) The total memory required by the algorithm
b) The amount of time an algorithm takes to process a given data
c) The number of lines of code in an algorithm
d) The number of iterations in a loop
16) The amount of time an algorithm takes to process a given data is called (E)
a) time complexity b) loop complexity c) if complexity d) watch complexity
17) Which of the following type of algorithms is characterized by a constant execution time, regardless of
the size of the input data? (E)
a) Linear time algorithms b) Exponential time algorithms
c) Constant time algorithms d) Quadratic time algorithms
18) What kind of algorithms have a time complexity of O(n)? (A)
a) Constant time algorithms b) Linear time algorithms
c) Logarithmic time algorithms d) Quadratic time algorithms
19) Which of the following describes the behavior of linear time algorithms? (A)
a) The algorithm’s execution time increases exponentially with input size.
b) The algorithm’s execution time increases logarithmically with input size.
c) The algorithm’s execution time increases directly in proportion to input size.
d) The algorithm’s execution time does not depend on the input size.
20) The term is used to describe algorithms whose time complexity is n2, typically caused by nested loops
(A)
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? (E)
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
SUBJECT: 41 COMPUTER SCIENCE Page 36 of 81
d) A linear search algorithm
22) Which of the following examples represent the worst case input for an insertion sort? (E)
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. (E)
a) Time Complexity b) Data Complexity c) Clock Complexity d) Lloop Complexity
24) Assertion (A): 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 ? (D)
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. (D)
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 (A): 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. (D)
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) (A): In Bubble Sort, the size of the unsorted portion of the list decreases with each pass. (D)
(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 (A): Selection sort makes (n - 1) passes through a list of n elements to sort the list.? (D)
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 (A): In selection sort, the number of passes required to sort a list of n elements is (n-1). (D)
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 (A): In selection sort, the sorted and unsorted parts of the list are clearly separated during the
SUBJECT: 41 COMPUTER SCIENCE Page 37 of 81
sorting process. (D)
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 (A): Selection sort is an in-place sorting algorithm. (D)
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 (A): In Selection Sort, the smallest element is found & placed at the beginning in each pass.
(D)
Reason (R): In each pass of Selection Sort, all elements of the unsorted list are compared to find the minimum
value. (D)
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) (A) 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 (D)
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 (A): Insertion sort divides the list into a sorted and an unsorted part. (D)
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) (A): In insertion sort, in each pass, the sorted list is traversed from the backward direction. (D)
(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 (A): In insertion sort, the first pass starts with an empty sorted list. (D)
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
SUBJECT: 41 COMPUTER SCIENCE Page 38 of 81
CHAPTER - 6
SEARCHING
1 MARK MCQ’S
1. What is searching? (E)
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? (E)
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? (E)
a) Linear search b) Binary search c) Search by hashing d) Selection search
4. Which of the following is sequential search or serial search? (E)
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)
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)
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? (E)
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)
a) Linear search b) Binary search c) Search by hashing d) Sequential search
9. Statement (A) : 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. (D)
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 (A) : Linear search method is the most fundamental and simplest method of
searching Statement (B) : Linear search is also called as sequential search method. (D)
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
SUBJECT: 41 COMPUTER SCIENCE Page 39 of 81
11. Statement (A) : 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
(D)
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 (A) : Linear search method will take more time
Statement (B) : Binary search method will take less time (D)
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
13. Statement (A) : Linear search method applicable for only sorted list
Statement (B) : Binary search method applicable for only sorted list (D)
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 (A) : Linear search method applicable for sorted and unsorted list
Statement (B) : Binary search method applicable for only sorted list (D)
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)
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)
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)
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)
a) Collision b) Wrong hashing c) Resolution d) Hash function
19. Which of the following formula is used to generate hash value? (D)
a) h(element)=element+size(hash table)
b) h(element)=element-size(hash table)
c) h(element)=element/size(hash table)
SUBJECT: 41 COMPUTER SCIENCE Page 40 of 81
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)
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. mean finding the location of the element. (E)
2. The simplest method of searching is . (E)
3. The linear search method is applicable for . (A)
4. method applied only on sorted list.(E)
5. is a technique which can be used to know the presence of a element in just one step.(A)
(Collision, Linear search, Binary search, Search by hash method, Remainder method, Sorted list)
1. search method compares key with all elements.(E)
2. search method compares key with only middle elements. (E)
3. Hash value is generated in method. (A)
4. Two elements map to the same slot in the hash table is called . (A)
5. The method used in generating hash value is called . (A)
SUBJECT: 41 COMPUTER SCIENCE Page 41 of 81
CHAPTER 7.
UNDERSTANDING DATA
MCQs:
1. ICT stands for (E)
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)
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)
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)
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)
a) Dato
b) Datium
c) Datum
d) Date
6. The government collects population data through (E)
a) Surveys
b) Census
c) Sampling
d) Interviews
7. Which of the following is NOT an example of data? (A)
a) Name and contact details of a person
SUBJECT: 41 COMPUTER SCIENCE Page 42 of 81
b) Images and videos
c) Online posts and comments
d) Final analysis report
8. Data stored in electronic form is preferred because (A)
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 (E)
a) Voting machines
b) Sports performance details
c) Satellites data
d) Library membership
10. Data that is organised in rows and columns is called (E)
a) Metadata
b) Structured data
c) Unstructured data
d) Processed data
11. Which of these is an example of structured data? (E)
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? (E)
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)
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 (E)
a) Structured data
SUBJECT: 41 COMPUTER SCIENCE Page 43 of 81
b) Tabular data
c) Fixed format data
d) Metadata
15. Data collection is the process of (A)
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)
a) UNESCO
b) NASA
c) WHO
d) IMF
17. Data storage refers to (A)
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)
a) RAM
b) CD/DVD
c) Pen Drive
d) Memory Card
19. The first step in the data processing cycle is (A)
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)
a) Online bill payment
b) Generating exam admit card online
c) Cash withdrawal through ATMs
d) Manual exam paper correction
21. Which of the following is NOT a measure of central tendency? (A)
a) Mean
SUBJECT: 41 COMPUTER SCIENCE Page 44 of 81
b) Median
c) Mode
d) Range
22. Mean is affected most by (A)
a) Mode
b) Outliers
c) Median
d) Standard deviation
23. Mean is also called as (E)
a) sum
b) difference
c) ratio
d) average
24. The middle value of sorted data is called (A)
a) Mean
b) Median
c) Mode
d) Range
25. Mode refers to (E)
a) Average of values
b) Middle value of data
c) Most frequently occurring value
d) Difference between maximum and minimum
26. Which of the following is a measure of variability? (E)
a) Mean
b) Median
c) Range
d) Mode
27. Range is calculated as (A)
a) Maximum + Minimum
b) Maximum – Minimum
c) Mean – Median
d) Mode × Frequency
28. Which measure uses ALL data values to calculate spread? (A)
a) Range
SUBJECT: 41 COMPUTER SCIENCE Page 45 of 81
b) Mode
c) Median
d) Standard deviation
29. Smaller value of standard deviation means (A)
a) Data are widely spread
b) Data are less spread
c) Outliers exist
d) Data is skewed
30. Larger value of standard deviation means (A)
a) Data are widely spread
b) Data are less spread
c) Outliers exist
d) Data is skewed
SUBJECT: 41 COMPUTER SCIENCE Page 46 of 81
CHAPTER - 8
DATABASE CONCEPTS
MCQ:
1. Which of the following is a limitation of manual record keeping? (A)
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 (E)
a) texts b) videos c) images d) all of the above
3. Data redundancy in file systems means (A)
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)
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)
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)
a) MS Word b) Oracle c) Notepad d) Windows
7. Retrieving data from a database is called (A)
a) querying b) formatting c) indexing d) modifying
8. Database schema primarily refers to (A)
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)
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)
a) database schema b) database instance
c) database catalog d) database constraint
SUBJECT: 41 COMPUTER SCIENCE Page 47 of 81
11. Which of the following is not an operation in data manipulation? (A)
a) Insertion b) Formatting c) Deletion d) Update
12. In a relational database tables are called as (E)
a) attributes b) tuples c) relations d) instances
13. A row in a relation is also called (E)
a) domain b) tuple c) attribute d) degree
14. A column in a relation is also called (E)
a) domain b) tuple c) attribute d) degree
15. The number of attributes in a relation is called (E)
a) degree b) domain c) cardinality d) instance
16. The number of tuples in a relation is called (E)
a) domain b) degree c) cardinality d) attribute
17. Candidate keys are (A)
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)
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)
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)
a) foreign key b) candidate key c) alternate key d) secondary key
SUBJECT: 41 COMPUTER SCIENCE Page 48 of 81
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
SUBJECT: 41 COMPUTER SCIENCE Page 49 of 81
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)
e. Arithmetic operations
f. Text alignment
g. Date formatting
h. Concatenation
11. Which of the following is a relational database management system?(easy)
a. MongoDB
[Link]
c. No SQL
d. Graph Database
12. Which SQL statement is used to retrieve data from a database?(easy)
[Link].
[Link]
[Link]
[Link]
SUBJECT: 41 COMPUTER SCIENCE Page 50 of 81
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
17. Which two constraints restricts range for column values?(easy)
a. UNIQUE
b. DEFAULT
c. PRIMARY KEY
d. CHECK
18. Which SQL command displays the structure of a table?(easy)
e. SHOW TABLE
f. DESCRIBE
g. STRUCTURE
h. VIEW TABLE
19. Which statement is used to add a new column to an existing table?(easy)
a. MODIFY COLUMN
b. ADD COLUMN TO
c. ALTER TABLE ADD
d. INSERT INTO TABLE
SUBJECT: 41 COMPUTER SCIENCE Page 51 of 81
20. Which constraint ensures that no two rows have the same value in a column? (easy)
e. NOT NULL
f. PRIMARY KEY
g. UNIQUE
h. FOREIGN KEY
21. Which of the following is true about foreign keys? (average)
a. They must reference a primary key or unique key
in another table.
b. They must always contain non-NULL values.
c. They enforce uniqueness in the referencing column.
d. They can reference columns with duplicate values
22. Which one of the following SQL command is used to insert new records into a table?
(easy)
a. ADD
b. INSERT
c. UPDATE
d. SELECT
23. Which of the following is part of Data Manipulation Language (DML)?(easy)
a. CREATE
b. ALTER
c. DELETE
d. DROP
24. What should be ensured before inserting a record with a foreign key?(average)
a. The referenced table must be empty
b. The referenced table must be populated.
c. The foreign key must be NULL.
d. The foreign key must be unique
25. Which format is used to store date values in MySQL? (easy)
a. DD-MM-YYYY
b. MM-DD-YYYY
c. YYYY-MM-DD
d. DD/YYYY/MM
26. Which one of the SQL clause used to filter records based on a condition?(easy)
e. FROM
f. SELECT
g. WHERE.
SUBJECT: 41 COMPUTER SCIENCE Page 52 of 81
h. HAVING
27. The keyword to rename a column in the output of a select query?(easy)
a. RENAME
b. TITLE
c. AS
d. ALIAS
28. Which clause ensures that duplicate values are not shown in the query result? (average)
a. UNIQUE
b. DISTINCT
c. ORDER BY
d. GROUP BY
29. Which operator is used to define a range in SQL queries?(average/understanding)
a. BETWEEN
b. WITHIN
c. LIMIT
d. IN
30. What does the ORDER BY clause do in SQL?
(average/understanding)
a. Sorts rows based on column values
b. Filters rows based on conditions
c. Groups rows with similar values
d. Limits the number of rows returned
31. Which operator is used to check for missing or unknown values in SQL?(easy)
a. NOT
b. NOT EXISTS
c. IS NULL
d. IN
32. The SQL operator is used for substring pattern matching is
( average)
a. IN
b. BETWEEN
c. LIKE
d. MATCHES
33. What does the % wildcard represent in SQL? ( average)
a. Exactly one character
b. Matches any single character
SUBJECT: 41 COMPUTER SCIENCE Page 53 of 81
c. Zero, one, or multiple characters
d. Only uppercase letters
34. Which query selects employees whose names start with 'K'?
( average)
a. SELECT * FROM EMPLOYEE WHERE Ename = 'K';
b. SELECT * FROM EMPLOYEE WHERE Ename LIKE '%K';
c. SELECT * FROM EMPLOYEE WHERE Ename LIKE 'K%';
d. SELECT * FROM EMPLOYEE WHERE Ename IN 'K_';
35. What does the query SELECT Ename FROM EMPLOYEE WHERE Ename
LIKE '_a%'; returns?
a. Names starting with 'a'
b. Names with 'a' as the last character
c. Names with 'a' as the second character .
d. Names with exactly two characters (average/Applying)
36. Which wildcard is used to match exactly one character in SQL?
a. %
b. _ C
c. . #
d. D. * (average/ Understanding)
37. Which SQL command is used to modify existing data in a table? (average/understanding)
a. UNION
b. INSERT
c. UPDATE
d. ALTER
38. What will happen if the WHERE clause omitted in an UPDATE statement?
a. No rows updated.
b. It demands condition interactively
c. All rows are updated.
d. Syntax error (average/applying)
39. Which of the following is a correct syntax to update multiple columns in
SQL? (average/applying)
a. UPDATE table SET col1 = val1 AND col2 = val2;
b. UPDATE table SET col1 = val1, col2 = val2;
c. UPDATE table SET (col1, col2) = (val1, val2);
d. MODIFY table SET col1 = val1, col2 = val2.
40. Which SQL statement is used to remove records from a table?
SUBJECT: 41 COMPUTER SCIENCE Page 54 of 81
(average/applying)
a. REMOVE
b. DELETE
c. DROP
d. ERASE
41. What does the ORDER BY clause do in SQL?
(average/understanding)
a. Sorts rows based on column values
b. Filters rows based on conditions
c. Groups rows with similar values
d. Limits the number of rows returned
42. Which operator is used to check for missing or unknown values in SQL?(easy)
a. NOT
b. NOT EXISTS
c. IS NULL
d. IN
43. The SQL operator is used for substring pattern matching is
( average)
a. IN
b. BETWEEN
c. LIKE
d. MATCHES
44. What does the % wildcard represent in SQL? ( average)
a. Exactly one character
b. Matches any single character
c. Zero, one, or multiple characters
d. Only uppercase letters
45. Which query selects employees whose names start with 'K'?
( average)
a. SELECT * FROM EMPLOYEE WHERE Ename = 'K';
b. SELECT * FROM EMPLOYEE WHERE Ename LIKE '%K';
c. SELECT * FROM EMPLOYEE WHERE Ename LIKE 'K%';
d. SELECT * FROM EMPLOYEE WHERE Ename IN 'K_';
46. What does the query SELECT Ename FROM EMPLOYEE WHERE Ename
LIKE '_a%'; returns?
a. Names starting with 'a'
SUBJECT: 41 COMPUTER SCIENCE Page 55 of 81
b. Names with 'a' as the last character
c. Names with 'a' as the second character .
d. Names with exactly two characters (average/Applying)
47. Which wildcard is used to match exactly one character in SQL?
a. %
b. _ C
c. . #
d. D. * (average/ Understanding)
48. Which SQL command is used to modify existing data in a table? (average/understanding)
a. UNION
b. INSERT
c. UPDATE
d. ALTER
49. What will happen if the WHERE clause omitted in an UPDATE statement?
a. No rows updated.
b. It demands condition interactively
c. All rows are updated.
d. Syntax error (average/applying)
50. Which of the following is a correct syntax to update multiple columns in
SQL? (average/applying)
a. UPDATE table SET col1 = val1 AND col2 = val2;
b. UPDATE table SET col1 = val1, col2 = val2;
c. UPDATE table SET (col1, col2) = (val1, val2);
d. MODIFY table SET col1 = val1, col2 = val2.
51. Which SQL statement is used to remove records from a table?
(average/applying)
a. REMOVE
b. DELETE
c. DROP
d. ERASE
52. Which function returns the name of the day from a given date?
(average/understanding)
a. DAY()
b. DAYNAME()
c. DATE()
d. NOW()
SUBJECT: 41 COMPUTER SCIENCE Page 56 of 81
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?
(average/understanding)
a. Adds all SalePrice values in the SALE table.
b. Adds SalePrice values for customer C0001.
c. Displays SalePrice for customer C0001.
d. Counts SalePrice entries for customer C0001.
57. Which SQL function returns the average of values in a column?
(easy/understanding)
a. SUM()
b. AVG()
c. COUNT()
d. MAX()
58. What does the COUNT(*) function return?
(easy/understanding)
a. Number of non-null values in a column
b. Number of distinct values
c. Total number of rows in a table
SUBJECT: 41 COMPUTER SCIENCE Page 57 of 81
d. Sum of all numeric values
59. Which function ignores NULL values while counting?
(easy/ Applying)
a. COUNT(*)
b. COUNT(column)
c. SUM(column)
d. MAX(column)
60. What will the query SELECT COUNT(DISTINCT Model) FROM
INVENTORY;return? (average/applying)
a. Total number of models
b. Number of rows in INVENTORY
c. Number of unique model types
d. Number of NULL values in Model
61. Which aggregate function return the largest value in a column?
(easy/understanding)
a. MIN()s
b. MAX()
c. COUNT()
d. AVG()
62. What is the output of SELECT AVG(Price) FROM INVENTORY WHERE Model
= 'LXI';?
(average/applying)
a. Average price of all cars
b. Average price of LXI model cars
c. Total price of LXI model cars
d. Number of LXI model cars
63. Which operation combines rows from two tables and removes
duplicates? (easy/understanding)
a. INTERSECT
b. MINUS
c. UNION
d. JOIN
64. What does the INTERSECT operation
return? (average /understanding)
a. All rows from both tables
b. Rows that are present only on the first table.
SUBJECT: 41 COMPUTER SCIENCE Page 58 of 81
c. Common rows from both tables
d. Rows that present only on the second table.
65. Which operation returns rows that are in the first table but not in the
second? (easy/understanding)
a. UNION
b. INTERSECT
c. MINUS
d. SELECT
66. Which of the following conditions must be met to apply UNION, INTERSECT,
or MINUS operations?
(average/apply)
a. Tables must have the same number of rows.
b. Tables must have the same number of columns and matching
data types.
c. Tables must be in sored order.
d. Tables must have primary keys.
67. What will the result of DANCE ∩ MUSIC contain?
(easy/apply)
a. All students from both events
b. Students only in MUSIC
c. Students only in DANCE
d. Students participate in both events.
68. What does the Cartesian product of two tables return?
(easy/understanding)
a. Only matching rows
b. All combinations of rows from both tables
c. Rows with NULL values
d. Duplicate rows only
69. If table A has 4 rows and table B has 5 rows, how many rows the Cartesian product A ×
B contain?
(easy/applying)
a. 9
b. 20
c. 4
d. 5
SUBJECT: 41 COMPUTER SCIENCE Page 59 of 81
70. What is the degree of the resulting relation when two Tables of degree three are
combined by Cartesian product?
(average/applying)
a. 3
b. 6
c. 9
d. 12
71. Which clause is used to filter rows after applying Cartesian product based on
a condition?
(easy/remembering)
a. GROUP BY
b. HAVING
c. WHERE.
d. ORDER BY
72. What does the JOIN operation do in SQL?
(easy/understanding)
a. Combines all possible rows from two tables
b. Combines rows from two tables based on a condition
c. Removes duplicate rows from a table
d. Filters rows based on a condition
73. Which JOIN type removes redundant columns when joining two tables with a
common attribute?
(average/understanding)
a. INNER JOIN
b. LEFT JOIN
c. NATURALJOIN
d. CROSS JOIN
74. What is the result of the query SELECT * FROM UNIFORM U JOIN COST C
ON [Link] = [Link];?
(average/applying)
a. Cartesian product of UNIFORM and COST
b. Only rows with matching UCode from both tables
c. All rows from UNIFORM
d. All rows from COST
75. How many JOIN operation are needed to combine N tables using equality condition?
(easy))
SUBJECT: 41 COMPUTER SCIENCE Page 60 of 81
a. N
b. N+1
c. N–1
d. 2
76. Identify the correct date function from the following.(easy)
a. FINDDATE ()
b. JULIANDATE ()
c. NOW ()
d. SYSTEM_DATE ()
77. The SQL command to modify the structure of a table is(easy)
a. CREATE
b. UPDATE
c. INSERT
d. ALTER
78. The most popular query language used by RDBMS is(easy)
a. MYSQL
b. PYTHON
c. C++
d. JAVA
79. Which of the following is a string single row built in function (easy)
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
SUBJECT: 41 COMPUTER SCIENCE Page 61 of 81
c. ORDER BY
d. WHERE
Fill in the Blanks.(all easy except Q27)
1. A is a collection of related tables used to store and manage data.
2. MySQL is a type of database management system.
3. The SQL command used to create a new table is .
4. The statement is used to modify the structure of an existing table.
5. To insert new data into a table, we use the statement.
6. The clause is used to filter rows based on specific conditions.
7. The clause is used to eliminate duplicate values from the result set.
8. The statement is used to change existing data in a table.
9. The operator is used to match values within a specified range.
10. The operator is used to match values from a given list.
11. The clause is used to sort the result of a query in ascending or descending order.
12. The operator is used for pattern matching using wildcards like % and _.
13. A in SQL performs a specific task and returns a single value.
14. row functions operate on individual rows and return one result per row.
15. row functions operate on a group of rows and return a single result.
16. The clause is used to group rows that have the same values in specified columns.
17. The operation combines rows from two or more tables based on common fields.
18. The SQL command used to remove a table from the database is .
19. IS NULL and IS NOT NULL are used to test
20. The clause is used to apply conditions on grouped data after aggregation.
21. clause is used along with select to avoid duplicate values in an SQL query.
22. operation is used to combine the selected rows of two tables at a time.
23. is a command which comes under DML.
24. is an aggregate function in SQL
25. operator defines the range of values inclusive of boundary values.
26. The function that converts string into uppercase is
27. The result of 5+NULL is (average)
SUBJECT: 41 COMPUTER SCIENCE Page 62 of 81
CHAPTER - 10
COMPUTER NETWORK
I. Multiple Choice Questions
1. Which of the following describes a computer
network? (Q1-Q59:easy
a. A system used to broadcast data
b. A system for printing documents
c. An interconnection between two or more computers or computing devices
d. A system for receiving data packets
2. Which of the following best defines a Local Area Network?
a. A network that connects devices across countries or continents
b. A network that connects devices within a limited geographical area
such as a room, building, or campus
c. A global collection of interlinked web pages
d. A wireless network only for mobile phones
3. The IEEE assigned number for wireless LAN is
a. IEEE 802.3
b. IEEE 802.5
c. IEEE 802.15
d. IEEE 802.11
4. Which media/technology is commonly used for LAN connectivity?
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
SUBJECT: 41 COMPUTER SCIENCE Page 63 of 81
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
SUBJECT: 41 COMPUTER SCIENCE Page 64 of 81
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
SUBJECT: 41 COMPUTER SCIENCE Page 65 of 81
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
SUBJECT: 41 COMPUTER SCIENCE Page 66 of 81
28. Which device is used to connect different devices through wires in a network?
a. Repeater
b. Hub
c. Router
d. Modem
29. Which device connects multiple computers or communicating devices in a network?
a. Hub
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?
SUBJECT: 41 COMPUTER SCIENCE Page 67 of 81
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
1. In which topology is each node connected to two other devices, one on each side?
a. Star
b. Ring
c. Mesh
d. Tree
2. The link in a ring topology is:
a. Unidirectional
b. Always wireless
c. Only analog
d. Irregular
3. In which topology does each device connect to a transmission medium?
a. Star
b. Bus
c. Ring
d. Mesh
4. In which topology is each device connected to a central node?
a. Ring
b. Star
c. Bus
d. Mesh
5. In which topology are there multiple branches, each with one or more basic topologies?
a. Mesh
b. Hybrid
c. Ring
d. Bus
6. Which of the following is a hierarchical topology?
a. Tree
SUBJECT: 41 COMPUTER SCIENCE Page 68 of 81
b. Ring
c. Bus
d. Mesh
7. Which of the following is a hybrid topology?
a. Star
b. Tree
c. Mesh
d. Star-Bus
8. Which of the following is a unique value associated with a NIC
a. IP address
b. MAC address
c. Port number
d. Subnet mask
9. The value is engraved on a NIC at the time of manufacturing and cannot be changed is the
a. IP address
b. MAC address
c. Port number
d. Subnet mask
10. Which address uniquely identifies each node in a network?
a. MAC address
b. Gateway address
c. DNS address
d. Port number
11. How many hexadecimal digits are used in a MAC address?
a. 8
b. 10
c. 12
d. 16
12. How many bits are used in an IPv4 address?
a. 32
b. 64
c. 128
d. 16
13. How many bits are used in an IPv6 address?
a. 32
SUBJECT: 41 COMPUTER SCIENCE Page 69 of 81
b. 64
c. 128
d. 256
14. 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
a. 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
SUBJECT: 41 COMPUTER SCIENCE Page 70 of 81
c. Unified Retrieval Language
d. Unique Routing Locator
53. What is the full form of URI?
a. Uniform Resource Identifier
b. Universal Resource Interface
c. Unique Reference Identifier
d. Unified Resource Index
54. What is the full form of WWW?
a. World Wide Web
b. Wide World Web
c. Web Wide World
d. World Web Wide
55. What is the full form of DNS?
a. Domain Navigation Server
b. Domain Name Server
c. Digital Naming structure
d. Distributed Name Service
56. What is the full form of ISP?
a. Internet Server Protocol
b. Integrated Signal Processor
c. Internet Sharing Platform
d. Internet Service Provider
57. What is the full form of IP?
a. Internet Protocol
b. Internal Path
c. Integrated Port
d. Interlinked Packet
58. What is the full form of OUI?
a. Organizationally Unique Identifier
b. Online User Interface
c. Open Universal Identifier
d. Operational Unit Index
59. Which of the following best describes a WPAN?
a. A network that connects devices across a city using fiber optics
b. A network connecting personal devices within about 10 meters using technologies like
Bluetooth or Wi-Fi Direct
SUBJECT: 41 COMPUTER SCIENCE Page 71 of 81
c. A global network of interlinked web pages accessed via browsers
d. A wired network connecting computers in an office using Ethernet cables(easy)
60. Why is LAN is considered comparatively secure?
a. It always uses fibre optics
b. Only authentic users within the network can access other computers or shared resources
c. Because it never connects to the internet
d. Because it uses abstract encryption methods. (average/understanding)
61. Which of these is a common advantage of using a LAN in an office or campus?
a. Unlimited geographic coverage
b. Very low data transfer rates
c. Ability for users to share printers and upload/download files from a local server
d. Requirement for manual packet switching for each message. (average)
62. Ethernet is best defined as:
a. A type of modem used for long-distance links
b. A set of rules that defines how devices connect with each other through cables in a LAN
c. A wireless protocol for PANs
d. A browser for accessing the World Wide Web(easy/remember)
63. Which of the following is a typical data rate range for LAN
a. 0.5 Mbps to 2 Mbps
b. 10 Mbps to 1000 Mbps
c. 10 Gbps to 100 Gbps
d. d. 1000 bps to 10 kbps (easy/remember)
64. Which of the following best describes a Wide Area Network (WAN)?
a. A network that connects devices within a single room or building
b. A network that connects LANs and MANs across different geographical locations, possibly
across countries or continents
c. A personal network connecting devices within 10 metres
d. A network used only for cable TV distribution (easy)
65. Which of the following is the largest example of a WAN?
a. A university campus network
b. A home Wi-Fi network
c. The Internet
d. A Bluetooth connection between two phones (easy/remember)
66. Which statement is true about how a WAN can be formed?
a. By connecting only wireless PANs together(average/understanding)
b. By connecting a LAN to other LANs via wired or wireless media
SUBJECT: 41 COMPUTER SCIENCE Page 72 of 81
c. By connecting devices using only USB cables
d. By connecting two devices using an RJ-45 cable only
67. Which organizations commonly use WANs to connect branches across different locations?
a. Small home users only (easy/remember)
b. Large businesses, educational institutions, and government organisations
c. Single-room offices with one computer
d. Devices connected by Bluetooth
68. Which of the following is a typical purpose of a WAN? (average/understanding)
a. To provide short-range high-speed sharing of a printer within a lab
b. To connect different branches of an organization in different cities or countries
c. To create a direct wired link between a phone and a laptop
d. To replace LANs in local classrooms
69. A company wants to connect its office in Delhi with its branch in Shimla and another branch
overseas. Which network type is most appropriate? (average/apply)
a. PAN
b. LAN
c. MAN
d. WAN
70. Which phrase correctly describes the relationship between the Internet and WANs?
(easy/remember)
a. The Internet is unrelated to WANs
b. The Internet is the largest WAN connecting billions of devices and millions of LANs
worldwide
c. The Internet is a PAN scaled down for homes
d. The Internet only connects devices within a campus.
71. Which of the following correctly describes an IP address?
a. A permanent hardware address burned into a network card.
b. A unique numeric address used to identify a node on an IP network.
c. A protocol for wireless communication
d. A web page address(easy/remember)
72. An IPv4 address is written as four decimal numbers separated by periods because it is a:
a. 16-bit address
b. 64-bit address
c. 32-bit address
d. 128-bit address (easy/remember)
73. Which of the following is a sample IPv4 address format?
SUBJECT: 41 COMPUTER SCIENCE Page 73 of 81
a. 2001:CDBA:0000:0000:0000:0000:3257:9652
b. [Link]
c. [Link]/8
d. [Link] (easy/remember)
74. Why was IPv6 introduced? (easy/remember)
a. To replace Ethernet standards
b. To provide a larger address space because IPv4’s 32 bits were insufficient.
c. To reduce MAC address length
d. To convert decimal addresses into binary automatically
75. The network topology where data can be transmitted in only one direction is
a. Star
b. Ring
c. Mesh
d. Bus(easy/remember)
76. Correct expansion form of HTTP is:
a. Hyperlink Text Transmit Protocol
b. Hyper Transfer Transmission Protocol
c. Hyper Text Transfer Protocol
d. Hypermedia Transmit Text Protocol (easy/remember)
77. Conversion of the domain name of each web server to its corresponding IP address is
a. Network
b. Domain Name System
c. URI
d. Domain Name Resolution. (easy/remember)
78. Printing documents within a building, can be done by using which type of network?
a. MAN
b. WAN
c. LAN
d. PAN (easy/remember)
79. The device used for conversion between digital and analogue signal is
a. Modem
b. Repeater
c. Router
d. Switch(easy)
80. The approximate range of personal area networks is
SUBJECT: 41 COMPUTER SCIENCE Page 74 of 81
a. 14 meters
b. 5 meters
c. 10 meters
d. 20 meters(easy)
**************************************************************
SUBJECT: 41 COMPUTER SCIENCE Page 75 of 81
CHAPTER - 11
DATA
COMMUNICATION
1 MARK MCQ’S
1. The exchange of data between two or more connected devices is called (E)
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 (E)
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 (E)
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 (E)
a) Receiver b) Sender c) Message d) Communication media
5. The path through which the message travels between source and destination is called (E)
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 (E)
a) Receiver b) Sender c) Protocol d) Communication media
7. Bandwidth is measured in (A)
a) bps b) Kbps c) Gbps d) Hertz(Hz)
8. MBps stands for (A)
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?(E)
a) Half duplex b) Simplex c) Full duplex d) Half simplex
10. Example of simplex communication mode is (E)
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?(E)
a) Half duplex b) Simplex c) Full duplex d) Half simplex
12. Example of half duplex communication mode is (E)
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 (E)
a) Half duplex b) Simplex c) Full duplex d) Half simplex
14. Example of full duplex communication mode is (E)
SUBJECT: 41 COMPUTER SCIENCE Page 76 of 81
a) Walkie-Talkies b) Fan c) TV d) Computer
15. Data is transferred through a physical links or cables is called (A)
a) Guide media b) Unguided media c) Data transfer d) Switching
16. Data is transferred in air through electromagnetic waves is called (A)
a) Guide media b) Unguided media c) Data transfer d) Switching
17. UTP stands for (A)
a) Un twisted pair b) Unit twisted pair
c) Unshielded twisted pair d) Urban twisted pair
18. STP stands for (A)
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 (E)
a) LAN b) WAN c) Bluetooth d) Tablet
20. HTTP stands for (A)
a) HeaderText Transfer protocol b) HyperText Transfer Protocol
c) HighText Transfer Protocol d) HomeText Transfer protocol
21. FTP stands for (A)
a) Fibre Transfer protocol b) Fact Transfer Protocol
c) File Transfer Protocol d) Firewall Transfer protocol
22. PPP stands for (A)
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)
a) Industry Service Provider b) Intel Service Provider
c) Infrared Service Provider d) Internet Service Provider
24. SMTP stands for (A)
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)
a) Transmission Control Protocol/Internet Protocol
b) Transfer Control Protocol/Internet Protocol
c) Transmit Control Protocol/Internet Protocol
d) Technology Control Protocol/Internet Protocol
SUBJECT: 41 COMPUTER SCIENCE Page 77 of 81
1 MARK FILLS IN THE BLANKS
(Twisted pair, Data transfer rate, Bandwidth, Circuit, Packets, Data)
1. is the range of frequencies available for transmission of data through that channel. (A)
2. is the number of bits transmitted between source and destination in one second. (A)
3. Older telephone uses switching technique. (A)
4. In packet switching, information or message is broken down into small pieces called .(E)
5. cables are less expensive and most commonly used in telephone lines and LAN’s.
(A) (SMTP, FTP, HTTP, HTML, WAN, LAN)
1. is the primary protocol to access the world wide web.(A)
2. language is used to create web pages(E)
3. protocol is used to transfer files from one machine to another.(E)
4. The protocol used for email services is .(E)
5. The network that cover largest area is .(E)
SUBJECT: 41 COMPUTER SCIENCE Page 78 of 81
CHAPTER-12
SECURITY ASPECTS
1 MARK MCQ’S
1. Network security is concerned with (A)
a) Protection of CPU b) Protection of Application software
c) Protection of our devices and data d) protection of Web camera
2. The software that is developed to damage hardware devices, steal data or cause any other trouble
to the user is called (E)
a) Virus b) Worms c) Ransomeware d) Malware
3. A piece of software code that harm your computer resources like CPU time, memory , personal
files or sensitive information is called (E)
a) Virus b) Worms c) Ransomeware d) Malware
4. A malware that incurs unexpected or damaging behavior on an infected computer system is (E)
a) Virus b) Worms c) Ransomeware d) Malware
5. Which type of malware targets user data? (E)
a) Virus b) Worms c) Ransomeware d) Malware
6. A virus spread through email, downloading and executing files from the internet is called. (E)
a) Virus b) Worms c) Trojan d) Malware
7. Which type of malware records and send collected information to an external entity
without knowledge of the user? (A)
a) Virus b) Worms c) Trojan d) Spyware
8. Which type of malware displays online advertisements using pop-ups?(E)
a) Virus b) Adware c) Trojan d) Spyware
9. A software is used to detect and remove viruses is called. (E)
a) Virus b) Adware c) Anti-Virus d) Spyware
10. A malware or hardware used to record the keys pressed by a user on the keyboard is called. (E)
a) Virtual Keyboard b) Keyloggers
c) Onscreen Keyboardd)Standard Keyboard
11. HTTPS stands for (A)
a) Hypertext Transfer Protocol
b) Hypertext Transfer Protocol Software
c) Hypertext Transfer Secure
d) Hypertext Transfer Sandbox
12. A network security system designed to protect a trusted private network from unauthorized access
is called. (A)
a) Firewall b) Spam c) Cookies d) Grey Hats
SUBJECT: 41 COMPUTER SCIENCE Page 79 of 81
13. A small file or data packet, which is stored by website on the client’s Computer, is called. (A)
a) Firewall b) Spam c) Cookies d) Grey Hats
14. Choose the item not belonging to the group (A)
a) Firewall b) Virus c) Worms d) Ransomeware
15. Which type of firewall placed on a computer to monitor the network? (A)
a) E-mail Firewall b) Network firewall
c) Host-based firewall d) White hat firewall
16. The person with skill to take control of other’s computer system , he is called.(A)
a) Thief b) Surfer c) Browser d) Hacker
17. Hackers with good intention are called. (E)
a) Black hats b) White Hats c) Grey Hats d) Hacker
18. If hackers use their knowledge to unethically break the laws, then they are called. (A)
a) Black hats b) White Hats c) Grey Hats d) Hacker
19. DoS stands for (A)
a) Distributed Of services
b) Denial of services
c) Depends on services
d) Due of services
20. Snooping means (E)
a) Secretly transferring data file
b) Secretly sending emails
c) Secretly listening to a conversation
d) Secretly watching online activities
1 MARK FILLS IN THE BLANK
(Network firewall, HTTP, HTTPS, Worms, Ransomware, Trojan)
1. are standalone programs that are capable of working on it’s own.(A)
2. malware target user data.(E)
3. Malware that does not self-replicate or infect other files is (A)
4. sends information over the network.(E)
5. placed between two or more networks and monitors the traffic between
different networks.(A)
SUBJECT: 41 COMPUTER SCIENCE Page 80 of 81
(White Hats, Black Hats, Cookies, Spam, Host based firewall, virus)
1. are used by the websites to store browsing information of the user. (E)
2. uses his knowledge to find and help in fixing the security flaws in the system. (A)
3. Any unwanted data, information, email, advertisement is called (E)
4. placed on computers and monitors the network traffic. (A)
5. uses his knowledge unethically break the law. (A)
SUBJECT: 41 COMPUTER SCIENCE Page 81 of 81