Browse all quizzes
Computer ScienceClass 12English

CBSE Class 12 Computer Science (083) Sample Paper 2023

The CBSE Class 12 Computer Science exam is notorious for testing both conceptual depth and practical debugging skills — and this paper trains you on both. Inside you'll find 15 questions spanning Python syntax and functions, data structures (lists, dictionaries, stacks, and queues), file I/O operations, SQL joins and query optimization, and the Python-SQL bridge using modules like sqlite3. The question styles mix multiple-choice conceptual traps, true/false statements designed to catch careless readers, and fill-in-the-blank code snippets that demand precision. This paper mirrors the official CBSE board's question distribution, difficulty ramps, and marking style for Class 12. By the end, you'll have a crystal-clear sense of which topics the examiners prioritize, how they phrase their "gotcha" options, and exactly how many seconds you can afford per question without panicking.

13 questions · play in your browser
No signup required — try it for free.

Questions in this quiz

Answers hidden — play to find out.

  1. Question 1

    What will be the output of the following Python code?

    def outer(x): def inner(y): return x + y return inner func = outer(5) print(func(3))

  2. Question 2

    Which of the following statements about default parameters in Python functions is correct?

  3. Question 3

    A function that calls itself to solve a smaller version of the same problem is called a _____ function.

  4. Question 4

    If a list in Python is defined as L = [1, 2, 3, 4, 5], what is the result of L[1:4]?

  5. Question 5

    A dictionary in Python is an unordered collection of key-value pairs.

  6. Question 6

    Which data structure follows the LIFO (Last In, First Out) principle?

  7. Question 7

    What is the result of executing the following code?

    stack = [] stack.append(10) stack.append(20) print(stack.pop()) print(stack)

  8. Question 8

    In Python file handling, the 'w' mode _____ the file if it exists.

  9. Question 9

    Which SQL clause is used to filter rows based on a condition?

  10. Question 10

    Consider two tables: Students(StudentID, Name) and Enrollments(EnrollmentID, StudentID, CourseID). To list all students and their enrollments, even if some students have no enrollments, which JOIN should be used?

  11. Question 11

    The sqlite3 module in Python is used to connect to and query SQL databases.

  12. Question 12

    What is the primary purpose of a PRIMARY KEY constraint in a database table?

  13. Question 13

    Which of the following is a valid SQL query to count the number of rows in a table named 'Products'?