CBSE Class 12th Computer Science Important MCQs: The CBSE Class 12th Computer Science Board Exam 2025 requires thorough practice, especially with Multiple-Choice Questions (MCQs), which play a key role in scoring well. To help students prepare efficiently, we have compiled the top 50 MCQs from previous years' question papers and CBSE sample papers, along with detailed answers. These important MCQs cover essential topics from all the chapters, ensuring a strong revision before the exam. Solve these high-weightage questions to boost your confidence and improve your exam performance.
Check: CBSE Class 12 Computer Science Syllabus 2024-25
CBSE Class 12 Sample Papers 2024-2025
CBSE Class 12th Computer Science Paper: Key Highlights
Particulars | Details |
Exam Conducting Body | Central Board of Secondary Education (CBSE) |
Subject | Computer Science |
Mode of Exam | Offline |
Exam Duration | 3 Hours |
Medium of Exam | English / Hindi |
Type of Questions | MCQs, Short and Long Answer Type Questions |
Theory Marks | 80 |
Internal Assessment | 20 |
Total Marks | 100 |
Passing Marks | 33% in aggregate |
CBSE Class 12th Computer Science Exam Top 50 MCQs with Answers
Here are 50 important multiple-choice questions (MCQs) from all chapters in your 12th Computer Science syllabus along with their answers:
1. State True or False:
“Variable declaration is implicit in Python.”
2. Which of the following types of table constraints will prevent the entry of duplicate rows?
(A) Unique (B) Distinct
(C) Primary Key (D) NULL
3. Which of the following is the correct output for the execution of the following Python statement?
print(5 + 3 ** 2 /2)
(A) 32 (B) 8.0
(C) 9.5 (D) 32.0
4. Which of the following items are present in the function header?
a) function name
b) parameter list
c) return value
d) Both a and b
5. If a=1,b=2 and c= 3 then which statement will give the output as : 2.0 from the following:
a) >>>a%b%c+1
b) >>>a%b%c+1.0
c) >>>a%b%c
d) a%b%c-1
6. import random AR=[20,30,40,50,60,70] Lower=random.randint(1,3) Upper=random.randint(2,4) for K in range(Lower, Upper+1): print(AR[K], end="#")
(a) 10#40#70# (b) 30#40#50#
(c) 50#60#70# (d) 40#50#70#
7. Which of the following options can be used to read the first line of a text file data.txt?
(a) F=open(‘data.txt’)
F.read()
(b) F=open(‘data.txt’,’r’)
F.read(n)
(c) F=open(‘data.txt’)
F.readline()
(d) F=open(‘data.txt’)
F.readlines()
8. Select the correct output of the code:
a = "Good bye 2022. Welcome 2023"
a = a.split('0')
b = a[1] + ". " + a[0] + ". " + a[2]
print (b)
(a) 22. Welcome 2. Good bye 2. 23
(b) Good bye 2. 2322. Welcome 2.
(c) 22. Welcome 2. 232. Good bye
(d) 22. Good bye 2. 23 Welcome 2.
9. In MYSQL database, if a table, EMPLOYEE has degree 5 and cardinality 4, and another table, DEPARTMENT has degree 3 and cardinality 3, what will be the degree and cardinality of the Cartesian product of EMPLOYEE and DEPARTMENT?
(A) 5,3 (B) 8,12
(C) 12,8 (D) 4,3
10. Given the following dictionaries dict_exam={"Exam":"AISSCE", "Year":2023} dict_result={"Total":500, "Pass_Marks":165} Which statement will merge the contents of both dictionaries?
(a) dict_exam.update(dict_result) (b) dict_exam + dict_result
(c) dict_exam.add(dict_result) (d) dict_exam.merge(dict_result)
11. A network with all client computers and no server is called_______.
(a) Networking (b) Peer to Peer network
(c) Client Server network (d) Any of them
12. Fill in the blank______is a communication methodology designed to deliver both voice and multimedia communications over Internet protocol.
(a) VoIP (b) SMTP
(c) PPP (d) HTTP
13. State whether the following statement is True or False:
An exception may be raised even if the program is syntactically correct.
14. The correct syntax of seek() is:
(a) file_object.seek(offset [, reference_point])
(b) seek(offset [, reference_point])
(c) seek(offset, file_object)
(d) seek.file_object(offset)
15. Which function is used to display the total number of records from table in a database?
(a) sum(*) (b) total(*)
(c) count(*) (d) return(*)
16. Fill in the blank Bluetooth is an example of __________
(a) personal area network (b) local area network
(c) virtual private network (d) wide area network
Q17 and 18 are ASSERTION AND REASONING based questions. Mark the correct choice as
(a) Both A and R are true and R is the correct explanation for A
(b)Both A and R are true and R is not the correct explanation for A
(c) A is True but R is False
(d)A is false but R is True
17. Assertion (A): A function is a block of organized and reusable code that is used to perform a single, related action.
Reason (R): Function provides better modularity for your application and a high degree of code reusability
18 Assertion (A): Text file stores information in ASCII or unicode characters.
Reason (R): In text file, there is no delimiter for a line.
19. Which of the following is not a valid Literal in Python:
a) True b) 0x2B
c) -2.5E-3 d) KVS
20. What will be the output of the python code given below:
P = [20, 50]
Q = [5, 8]
P.extend(Q)
print(P)
a) [20, 50, 5, 8] b) [20, 50, [5, 8]]
c) [20, 50] d) [5, 8, 20, 50]
21. Consider the following string declaration in python:S = ‘PROCEDURE’
Which of the following statements will produce output as ‘RUDE’?
a) print(S[4:8]) b) print(S[-2:3:-1])
c) print(S[-2:-6]) d) print(S[7:-5:-1])
22. Which of the following outcome is expected from the following code:
import random
SIDES = ('EAST','WEST','NORTH','SOUTH')
N = random.randint(1,3)
OUT=""
for x in range (N,1,-1):
OUT=OUT+SIDES[x]
print(OUT)
a) SOUTHNORTHWEST b) SOUTHNORTH
c) NORTHWEST d) SOUTH
23. What will be the output of the following code?
L = [2, 4, '2', 2.0, [2, 20], 'KV2']
print(L.count(2))
a) 1 b) 2
c) 3 d) 4
24. Expand the following terms:
(i) POP3
(ii) SMTP
25. DROP in MySQL is which type of command?
a) DDL b) DML
c) DCL d) TCL
26. State True or False:
“Mutable data types in python allows changes at the same memory location”
27. Consider the following python code:
F = open('FILE.TXT')
N = F.read(2)
If FILE.TXT contains text as: 12BENGALURU
What will be the data type of N?
a) Integer b) Boolean
c) String d) None
28. Which of the following statement is false?
a) Try block tests the excepted error to occur
b) Except block handles the run time error
c) Multiple except blocks cannot be associated to one try block
d) Finally block always gets executed either exception is generated or not
29. Which of the following statement(s) will not create dictionary D?
a) D = {2:2, 'A':'A'} b) D = {(2,):(2,),('A'):('A')}
c) D = {[2]:[2], ['A']:['A']} d) D = {(2):[2], ('A'):['A']}
30. A binary file contains details of students in the form of list i.e [RollNo, Name, Age]. Which of the following method(s) will be used to read data from the binaryfile?
a) load() b) read()
c) readlines() d) reader()
31. Which of the following statement would give an error during execution of the following code? tup = (4, 'KVS', 5.5, 3) print(tup[2]+100) #Statement 1
print(max(tup)) #Statement 2
print(tup.index(5.5)) #Statement 3
del tup #Statement 4
a) Statement 1 b) Statement 2
c) Statement 3 d) Statement 4
32. The syntax of seek() is given as follows:
file_object.seek(offset [, reference_point]) If the value of reference_point is 2, then which of the following statement is correct?
a) Value of offset must be positive
b) Value of offset must be negative
c) Value of offset can be positive or negative
d) Value of offset must be zero
33. Which of the following statements is false?
a) In circuit switching physical path is required between systems.
b) Message switching data is first stored, then forwarded to the next node.
c) In Message switching data is always divided into equal sized units before transmission.
d) Internet uses packet switching technique.
34. A ___________ is a network device that connects two networks with different transmission protocols together.
a) Gateway b) Bridge
c) Switch d) NIC
ASSERTION AND REASONING based questions. Mark the correct choice as
(a) Both A and R are true and R is the correct explanation for A
(b) Both A and R are true and R is not the correct explanation for A
(c) A is True but R is False
(d) A is false but R is True
35. Assertion (A):- A python function that accepts parameters can be called without any parameters.
Reasoning (R):- Functions can be defined with default values that are used, whenever corresponding values are not received in function call statement.
36 Assertion (A):- ‘rb+’ and ‘wb+’ are valid file modes for opening binary files.
Reasoning (R):- Python supports simultaneous reading and writing in Binary files.
37. State True or False.
“Identifiers are names used to identify a variable, function.
38. Which of the following is a DDL command?
(a) SELECT (b) ALTER TABLE (c) INSERT INTO (d) UPDATE 1
39. What will be the output of the following statement?
10 > 5 and 7 > 12 or not 18>3 1
40. What will be the output of the following Python Code?
ANIMAL={"dog":10,"tiger":5,"elephant":15,"Cow":3}
print("Tiger" not in ANIMAL)
(a) True (b) False (c) Error (d) None
41. Which of the transmission media has the highest bandwidth?
(a) Coaxial cable (b) Twisted pair cable (c) Fiber optic cable (d) None of these
42. Exceptions are caught in ---------------------
(a) try block (b) except block (c) finally block (d) else block
43. execute() method can execute ________ .
(a) DDL statements
(b) DML statements
(c) DDL and DML statements.
(d) Select statement only
44. To establish a connection between Python and sql database, connect() is used. Which of the
following arguments may not necessarily be given while calling connect()?
(a) host
(b) database
(c) user
(d) password
45. What is the purpose of the `rowcount` attribute in Python-Mysql database connectivity?
(a) Number of rows affected by the last executed command
(b) Total number of rows in the database
(c) Total number of columns in the database
(d) Number of tables in the database
46. Out of the following guided media, which is not susceptible to external interference?
(i) Twisted Pair (ii) Co-axial Cable (iii) Fiber Optical (iv) Electric Wire
47. Which of the following device is used for sorting and distribution of data packet to theirdestination based on their IP Address?
(i) Gateway (ii) Router (iii) Bridges (iv) Switch
48. Which of the following device is used to connect network of different protocols so that theycan communicate properly?
(i) Gateway (ii) Router (iii) Bridges (iv) Switch
49. ______ is a communication methodology designed to deliver both voice and multimedia
communications over Internet protocol.
(A) SMTP (B) VoIP (C) PPP (D) HTTP
50. Which of the following is used to receive emails over Internet?
a) SMTP b) POP c) PPP d) VoIP
CBSE Class 12th Computer Science MCQ Answers 2025
Answers |
---|
1. True |
2. (C) Primary Key |
3. (C) 9.5 |
4. (d) Both a and b |
5. (b) >>>a%b%c+1.0 |
6. (b) 30#40#50# |
7. (c) F=open(‘data.txt’) F.readline() |
8. (a) 22. Welcome 2. Good bye 2. 23 |
9. (B) 8,12 |
10. (a) dict_exam.update(dict_result) |
11. (b) Peer to Peer network |
12. (a) VoIP |
13. True |
14. (a) file_object.seek(offset [, reference_point]) |
15. (c) count(*) |
16. (a) personal area network |
17. (a) Both A and R are true and R is the correct explanation for A |
18. (b) Both A and R are true and R is not the correct explanation for A |
19. (d) KVS |
20. (a) [20, 50, 5, 8] |
21. (b) print(S[-2:3:-1]) |
22. (a) SOUTHNORTHWEST |
23. (c) 3 |
24. (i) Post Office Protocol 3 (ii) Simple Mail Transfer Protocol |
25. (a) DDL |
26. True |
27. (c) String |
28. (c) Multiple except blocks cannot be associated to one try block |
29. (c) D = {[2]:[2], ['A']:['A']} |
30. (a) load() |
31. (b) Statement 2 |
32. (c) Value of offset can be positive or negative |
33. (c) In Message switching data is always divided into equal-sized units before transmission. |
34. (a) Gateway |
35. (a) Both A and R are true and R is the correct explanation for A |
36. (a) Both A and R are true and R is the correct explanation for A |
37. True |
38. (b) ALTER TABLE |
39. False |
40. (a) True |
41. (c) Fiber optic cable |
42. (b) except block |
43. (c) DDL and DML statements |
44. (b) database |
45. (a) Number of rows affected by the last executed command |
46. (iii) Fiber Optical |
47. (ii) Router |
48. (i) Gateway |
49. (B) VoIP |
50. (b) POP |
Comments
All Comments (0)
Join the conversation