★★★★★
"The one step solution for my son. Modern Age Coders make learning coding so simple that kids love it. The teachers explain complex concepts clearly with practical exercises and interactive content."
Ria Mukherjee
Parent
CBSE Class 12 · Computer Science, code 083 · Practical viva 2026-27
Most viva lists give you a definition to memorise. Then the examiner turns to your own program, points at a line and asks what happens if it is removed. These 60 class 12 computer science viva questions and answers run in the order that talk usually takes: your report file, your project, your Python, files, stack, SQL, connectivity and networks. Say your answer aloud first, then open ours.
Live one to one · 60 original questions below · rehearsed on your own file and project · your days, your timing
Start here
The Class 11 and 12 course that covers the 083 syllabus with its file and project, plus one course for each half of the viva that students find hardest to talk about.

083 / Full syllabus
The CBSE track teaches Python, files, stack, SQL, networks and connectivity, with help on the practical file, the project and the viva.
Open the course →
Python / From the base
For a student who can copy a program but not explain it: functions, data structures and files, rebuilt through small projects of their own.
Open the course →
SQL / Tables to apps
SELECT to joins, then a Python program on top. It goes past the board syllabus, which helps if your project is a database app.
Open the course →Ans. The short version
Class 12 computer science viva questions and answers for CBSE 083 come from three places: your report file, your project, and the Python, SQL and networks behind them. The viva carries 3 of the 30 practical marks in 2026-27, beside the lab test (12), report file (7) and project (8). A strong answer names the idea, gives the reason, and points to a line in your own work. Modern Age Coders rehearses the viva live, personalised one to one, on your own file and project, at your own days and timing. A priority demo lets you try one full class first.
Q1. What is the viva worth, and how is it won?
The viva voce is 3 marks out of the 30 for the practical, in the CBSE 083 syllabus for 2026-27. The same short conversation also shows whether the file and project, 15 marks between them, are really yours.
| Practical head | Share | Marks |
|---|---|---|
| Lab test: Python program 8, SQL queries 4 | 12 | |
| Project | 8 | |
| Report file | 7 | |
| Viva voce | 3 | |
| Practical total | 30 |
Then stop. The next question tends to pick up the last word you said, so make it one you can defend.
When. For schools on the regular session, CBSE schedules practicals from 1 January 2027; winter-bound schools have 9 November to 19 December 2026. Your school fixes your own day, so ask for it now.
What is not published. CBSE gives no list of viva questions and no split of the 3 marks. Nobody can promise you the questions, only the kinds.
| The opening question | An answer that stalls | An answer that stands | The likely "what if" |
|---|---|---|---|
Why rb here? | "Because it is a binary file." | "The records were pickled, so they are bytes. I only read here, so I do not need rb+." | And if you had typed wb? |
| What is the primary key? | "The unique one." | "mid. Two members can share a name, so a name cannot identify a row." | Can it be left empty? |
| Where is the stack's top? | "At the end." | "At the last index, because append() and pop() both work there." | What if the list is empty? |
Why commit()? | "To save." | "An INSERT is not permanent until it is committed. My add function commits after execute()." | Does the SELECT need it? |
If you do not know, say which part you do know: "I have not used seek() in my file, but it moves the file pointer."
Q2. What will they ask about your own work?
Questions 1 to 11 have no textbook answer. The samples use an invented project, a canteen pre-order program: swap in yours.
random, takes typed input, or appends to a file that already has data.Still filling pages? The Class 12 practical file has the format and programs with output.
Say the failure, not only the rule. "w erases the file" is a rule. "I lost my test data by opening with w, so this program now opens with a" is an answer only the person who wrote the program can give.
int() raises ValueError, my except block prints a message and asks again." If yours crashes, fix it today.A complete worked project with its own viva questions is on Class 12 CS project in Python and MySQL.
Q3. Can you read a program aloud?
A short file program raises parameters, scope, exceptions and return values all at once. Talk through this one before you open the answers.
import pickle
LIMIT = 10 # global variable
def low_stock(filename, limit=LIMIT):
"""Show items below limit, return the count."""
found = 0 # local variable
try:
with open(filename, "rb") as f:
while True:
item = pickle.load(f)
if item["qty"] < limit:
print(item["name"], item["qty"])
found += 1
except EOFError:
pass # all records read
finally:
print("Search over")
return found
Test data: lab.dat holds three dictionaries, Mouse 4, Cable 25 and Keyboard 9, each written with its own pickle.dump().
# print("Items to buy:", low_stock("lab.dat"))
Mouse 4
Keyboard 9
Search over
Items to buy: 2
# print("Items to buy:", low_stock("lab.dat", 5))
Mouse 4
Search over
Items to buy: 1
The function's own lines print before "Items to buy", because Python must finish the call to get the value it has to print.
filename is positional and must be given. limit has a default, so the first call uses 10 and the second replaces it with 5.while True. How does it ever end?
pickle.load() raises EOFError. Control leaves the loop and goes to the except.EOFError a mistake in this program?
pass is the right response.open() raises FileNotFoundError, which this except does not catch. The finally still prints "Search over", then the program stops. Fix: add except FileNotFoundError with a message.f.close()?
found when you could print it?
item["qty"] == 0, or call it with a limit of 1 and change nothing.def total(rate=5, qty): work?
None. So print(show()) prints an extra None.x += 1 and it failed. Why?
x local to that function, so it is read before it has a value: UnboundLocalError. Declare global x, or better, pass it in and return it.randint(1, 6) and randrange(1, 6)?
randint can give 6. randrange stops at 5. For a dice program only the first is right.More of this kind: functions in Python for Class 12.
Q4. Files, then the stack
File questions are nearly all "what if" questions. Every answer from 26 to 40 was checked by running the code.
f.read() twice in a row. What does the second one return?
f.seek(0) to read again.readline() show a blank line, and how does it show the end?
r+ and w+ both read and write. Which one is dangerous?
w+, because it empties the file on opening. r+ keeps the content, writes over it from the start, and needs the file to exist already.a+ and read nothing. Why?
seek(0) before reading.write() take a list or a number?
writelines(), which adds no line breaks of its own.rb+, how do you update one record in place?
f.tell() before each load. When the record matches, change it, seek() back to the stored position and dump. Catch: a longer record overwrites part of the next one, so reading all and rewriting is safer.w and then dump?
dump() writes bytes.The programs behind these are on CSV and binary files for Class 12.
reader() gives each field as a string. Convert with int() or float() before adding.next() on the reader once before the loop.writerow("Asha") put in the file?
A,s,h,a, because it takes each item of a sequence as one field. Pass a list: writerow(["Asha"]). For many rows at once, writerows() takes a list of lists.[4, 2], with 2 on top. The values popped were 9, then 7.pop() on an empty list raises IndexError. Follow-up: could a list give overflow? Not in our programs, since no maximum size is fixed.More practice: stack for Class 12.
Q5. SQL and the link to Python
SQL questions are easiest to answer from rows you can see. Keep one pair of tables like these in your head and prove every answer on them.
| mid | mname | cid | fee |
|---|---|---|---|
| 11 | Aarav | 1 | 600 |
| 12 | Diya | 2 | 400 |
| 13 | Kabir | 1 | NULL |
| 14 | Meher | 2 | 400 |
| 15 | Rohan | 1 | 600 |
| cid | cname | room |
|---|---|---|
| 1 | Robotics | L2 |
| 2 | Debate | A1 |
| 3 | Chess | B4 |
cid and cname could both identify a row if club names never repeat, so both are candidates. cid is primary, cname is alternate. MEMBER.cid is a foreign key.WHERE fee = NULL return nothing?
IS NULL finds Kabir. Follow-up: fee <> 600 also misses him and gives only Diya and Meher.COUNT(*) and COUNT(fee) give?
COUNT(*) counts rows, COUNT(fee) skips the NULL. AVG skips it too: 2000 over 4 members is 500.GROUP BY cid HAVING COUNT(*) > 2 leaves club 1 with 3. WHERE runs before grouping, so it cannot use the count.cid?
SELECT * the equi-join shows 7 columns, cid twice; the natural join shows 6. Chess is missing from both: it has no members.connect() with host, user, password and database, create a cursor(), execute() the query, then commit() for a change or fetch for a SELECT, and close.commit() belongs to the connection.fetchone(), then fetchall(). What comes back, and what if you fetch again?
fetchone() raised InternalError: No result set available, while some cursor types return None. Run the query again instead.rowcount is 0 after the UPDATE. No error is raised, so check it.%s when format() also works?
format() I must add the quotes, and a name like D'Souza breaks the query. With %s and a tuple of values, the connector does the quoting. It also stops typed text from being run as part of the query.Expect the password question. "Why is your database password visible in the code?" An honest reply: it is a school lab project, and in a real program it would be kept outside the source file.
Write the queries, not only the definitions: Class 12 SQL questions and Python MySQL connectivity.
Q6. The last topic, and the last week
Networks answers are short comparisons. Learn each pair by the one thing that separates them.
The full unit, with comparison tables, is on computer networks for Class 12.
Explain every file program in two sentences, aloud. Mark the ones where you stop.
Questions 5 to 11 with your whole group. Each person explains a part written by somebody else.
Questions 12 to 60, mixed. Anything you missed goes on a list of at most ten.
Somebody who has not seen your code opens the file and points.
Only the list of ten, and one run of the project from start to exit.
The teacher plays the examiner on your file: opens a page, points at a line, asks what, why and what if, and does not help until you finish.
Correct term, reason, and a line from your own work. You see which of the three you keep leaving out.
"Now change it so that..." is asked with the editor open, so the lab test and the viva are practised together.
After the practical comes the theory paper on 31 March 2027. The path between them is on the Class 12 CS revision plan.
One to one, with a class to try first
Nobody can rehearse a viva by listening to another student answer. So these classes are personalised one to one only, at the days and timing you choose, and they start from your own report file. Try a priority demo before you enrol: the fee is adjusted against the first month if you go ahead. A free demo class is there as well. Billing is monthly, there is no admission fee, and you can stop at any month end.
Before you enrol · Try a class
a full live class of about 45 to 60 minutes
The classes · Choose your own timing
₹4,999
per month, 4 private classes, fully flexible timingtwo private classes a week, at a time set with you
If your school has already fixed the practical date, tell us when you call, and the plan is built backwards from it. If the report file is not complete yet, you write the missing programs yourself in the first classes with the teacher checking each one, since a viva on a half-done file goes badly however well you speak. Fees are shown in your own currency.
Studying outside India?
A CBSE school in Muscat, Riyadh or Singapore uses the same 083 syllabus, the same 30-mark practical and the same 3 marks for the viva. Classes are held after your school day, in your own time.
| Where you live | Time difference | Usual class window, local time | Format |
|---|---|---|---|
| India every Indian city | Indian time | Any time you choose | Personalised 1-on-1 |
| UAE and Oman Dubai, Abu Dhabi, Sharjah, Muscat | 1 h 30 min behind India | 3:00 PM to 9:00 PM | Personalised 1-on-1 |
| Saudi Arabia, Qatar, Kuwait, Bahrain Riyadh, Jeddah, Dammam, Doha, Kuwait City, Manama | 2 h 30 min behind India | 3:00 PM to 9:00 PM | Personalised 1-on-1 |
| Nepal Kathmandu | 15 min ahead of India | 4:30 PM to 9:00 PM | Personalised 1-on-1 |
| Ethiopia and East Africa Addis Ababa and East Africa Time | 2 h 30 min behind India | 4:30 PM to 9:00 PM | Personalised 1-on-1 |
| Singapore and Malaysia Singapore, Kuala Lumpur | 2 h 30 min ahead of India | 3:30 PM to 9:00 PM | Personalised 1-on-1 |
Screen sharing is all a viva rehearsal needs: your editor, your file and your voice. Practical dates differ between schools abroad too, so send us yours and we plan from it.
What families say
Real reviews from real families. We neither write nor commission them.
★★★★★
"The one step solution for my son. Modern Age Coders make learning coding so simple that kids love it. The teachers explain complex concepts clearly with practical exercises and interactive content."
Ria Mukherjee
Parent
★★★★★
"Modern Age Coders has been a game-changer for me. I struggled to grasp IT concepts and coding before joining, but their classes transformed everything. I can now confidently write complex programs with ease."
Samriddha Mondal
Student
★★★★★
"One of the most wonderful education centres out there. Education is not limited to school syllabus but focuses on skill development."
Vansh Agarwal
Student
★★★★★
"My child Dhairya is really enjoying the Modern Age Coders classes. This is his first online class and he eagerly looks forward to it. I can already see his improvement, and the teachers are very cooperative."
Sonam Oswal
Parent of Dhairya
★★★★★
"Modern Age Coders have wonderful teachers who teach in a clear, easy and practical way. The teacher boosts students' confidence and inspires them to learn without hesitation."
Sonu Goyal
Parent
★★★★★
"I highly recommend this computer coding class! The teachers are incredibly knowledgeable and passionate about coding."
Ritu Kedia
Parent
The rest of the Class 12 series
Every page in the CBSE Class 12 Computer Science series, grouped by what you need.
CBSE Class 12 Informatics Practices (065): Class 12 IP practical file Class 12 IP project with source code Class 12 IP sample paper practice Class 12 IP important questions
CBSE Class 12 Information Technology (802): IT 802 practical and project file IT 802 Java notes and programs IT 802 notes
CBSE Class 11 CS, IP and AI: Class 11 CS practical file Class 11 IP practical file CS or IP in Class 11
ISC Computer Science (868): ISC Class 12 CS syllabus 2027 ISC Class 12 CS practice paper ISC Class 12 practical questions solved ISC Boolean algebra and K-maps
Program lists with output: Class 12 CS practical file 20 Python programs for Class 12 Menu-driven programs in Python
Questions about the CS viva
The viva voce is 3 marks in the CBSE 083 syllabus for 2026-27. The practical is 30 marks in all: lab test 12, report file 7, project 8 and viva 3. Informatics Practices (065) is different, with 5 marks for the viva.
CBSE does not publish a list. Expect questions on the programs in your report file, the purpose and tables of your project, file modes, pickle and CSV, functions and scope, exceptions, the stack, SQL clauses and joins, and the connectivity functions. This page has 60 of those kinds with short spoken answers.
There is no fixed number in the syllabus. For 3 marks the conversation is short, and it often grows out of one answer: a question, the reason behind your reply, then a "what if". Prepare to go three levels deep on your own programs.
For schools on the regular session, CBSE schedules practical, project and internal assessment from 1 January 2027. Winter-bound schools have 9 November to 19 December 2026. Each school sets its own day, so confirm yours with your teacher.
Why you chose the problem, who uses it, which part you wrote, why you used files or a database, what each table and key does, what happens on wrong input, how you tested it, and where any outside code came from. Questions 5 to 11 on this page are the project set, with sample answers.
Be ready for primary, candidate, alternate and foreign keys, degree and cardinality, NULL with IS NULL, COUNT(*) against COUNT(column), WHERE against HAVING, the size of a Cartesian product, equi-join against natural join, and DELETE, DROP and ALTER.
Very likely, because text, binary and CSV programs usually fill much of the report file. Prepare for what goes wrong: a second read that returns nothing, w+ erasing a file, EOFError, and CSV values arriving as strings.
They are not in the Class 12 CS syllabus for 2026-27. The only data structure listed is the stack, built with a list. SQL subqueries, views and triggers are not listed either. If your project uses something extra, be ready to explain it.
Say so briefly, then offer the nearest thing you do know: "I have not used natural join in my file, but it joins on the column both tables share." A confident wrong guess tends to draw more questions on the same point.
Yes. Classes are live and personalised one to one at your own days and timing, and the teacher questions you on your actual file and project. Try a priority demo first: a full class of about 45 to 60 minutes with a written skill report, its fee adjusted against the first month if you enrol. There is a free demo class too.
Start
In the free demo class, share one program from your report file and the teacher asks what, why and what if, the way a viva would. You hear which answers held up and which need work.
For a full class at a slot you pick, book a priority demo: the questions cover your file and your project, one weak program is corrected with you, and a written skill report follows. If you enrol, its fee is adjusted against the first month.
Want more programs to practise explaining? Start with 20 Python programs for CBSE Class 12.
WhatsApp us · +91 91233 66161 · connect@modernagecoders.com
Every class is live video. The form requests a callback and reserves nothing.
A full live class of about 45 to 60 minutes at a slot you pick, with a written skill report and learning roadmap on WhatsApp afterwards. The fee is adjusted against your first month if you enrol.
Book a priority demo