12th Standard CBSE Syllabus & Materials
12th Standard CBSE
CBSE 12th Economics Government Budget and the Economy Previous year Question Papers Study Material - QB365 Set A
NEW12th Standard CBSE
CBSE 12th Computer Science Interface Python with MySQL - New Previous year Question Papers Study Material - QB365 Set A
NEW12th Standard CBSE
CBSE 12th Computer Science Database Concept - New Previous year Question Papers Study Material - QB365 Set A
NEW12th Standard CBSE
CBSE 12th Computer Science Data Communication - New Previous year Question Papers Study Material - QB365 Set A
NEW12th Standard CBSE
CBSE 12th Computer Science Data Structures - New Previous year Question Papers Study Material - QB365 Set A
NEW12th Standard CBSE
CBSE 12th Computer Science Functions - New Previous year Question Papers Study Material - QB365 Set A

Published on: 15/09/2018
Model Question Paper
Download CBSE Class 12th Standard CBSE Computer Science question papers, sample papers, important questions, and previous year solved papers in PDF format. Get free study materials, NCERT solutions, and exam preparation resources for Class 12th Standard CBSE Computer Science
Questions + Answers key
Take MCQ Computer Science Test

1.
Convert \((\overset { \_ \_ \_ \_ \_ \_ \_ }{ \bar { X } .Y } ).(\overset { \_ \_ \_ \_ \_ \_ \_ \_ }{ \bar { X } .\bar { Z } } )\) into canonical Sum of Products form
2.
Observe the following table carefully and write the names of the most appropriate columns, which can be considered as (i) candidate keys and (ii) primary key.
Table: Product
| CID | CNAME | AMOUNT | COUNTRY | ITEM |
| 101 | ALLE | 100000 | JMEKA | SHOES |
| 111 | BEN | 20000 | FRANCE | HELMET |
| 110 | RIKI | 25000 | AMERICA | BAG |
| 011 | BRETT LEE | 105000 | AUSTRALIA | BAT |
3.
What is the need of normalization?
4.
Consider the following supplier table:
TABLE: Supplier
| Suppcode | Lastname | Firstname | City |
| 1 | Jain | Anuj | Noida |
| 2 | Goel | Pooja | Kanpur |
| 3 | Sharma | Raman | Delhi |
| 4 | Gupta | Satish | Noida |
Write a query to find all suppliers, who reside in Noida and also give the resultant table.
5.
Why are NAND and NOR gates called Universal gates?
6.
How many input combinations can be there in the truth table of a logic system having(N) input binary variables?
7.
Create a table named PROGRAMMERS with the following structure:
| P_Name | 20 Characters |
| DOJ | Date |
| SAL | NUMBER |
i) Display the name of the programmer, which has the highest salary.
ii) Update the salary of all programmer by 2000 whose name start with letter 'R'.
8.
Write SQL commands for (a) to (g) on the basis of the table SPORTS
TABLE: SPORTS
| STUDENTNO | CLASS | NAME | GAME1 | GRADE | GAME2 | GRADE1 |
| 10 | 7 | Sameer | Cricket | B | Swimming | A |
| 11 | 8 | Sujit | Tennis | A | Skating | C |
| 12 | 7 | Kamal | Swimming | B | Football | B |
| 13 | 7 | Veena | Tennis | C | Tennis | A |
| 14 | 9 | Archana | Basketball | A | Cricket | A |
| 15 | 10 | Arpit | Cricket | A | Atheletics | C |
(a) Display the names of the students, who have grade 'C' in either GAME1 or GAME2 or both.
(b) Display the number of students getting grade'A' in cricket.
(c) Display the names of the students who have same game for both GAME1 and GAME2.
(d) Display the games taken up by the students, whose name starts with 'A'.
(e) Add a new column names MARKS.
(f) Assign a value 200 for Marks for all those who are getting grade 'B' or grade 'A' in both GAME1 and GAME2.
(g) arrange the whole table in the alphabetical order of NAME.
9.
Study the following tables DOCTOR and SALARY and write SQL commands for the equations (a) to (d) and give outputs for SQL queries (e) and (f)
TABLE: DOCTOR
| ID | NAME | DEPT | SEX | EXPERIENCE |
| 101 | John | ENT | M | 12 |
| 104 | Smith | ORTHOPEDIC | M | 5 |
| 107 | George | CARDIOLOGY | M | 10 |
| 114 | Lara | SKIN | F | 3 |
| 109 | K George | MEDICINE | F | 9 |
| 105 | Johnson | ORTHHOPEDIC | M | 10 |
| 117 | Lucy | ENT | F | 3 |
| 111 | Bill | MEDICINE | F | 12 |
| 130 | Morphy | ORTHOPEDIC | M | 15 |
TABLE: SALARY
| ID | BASIC | ALLOWANCE | CONSULTATION |
| 101 | 12000 | 1000 | 300 |
| 104 | 23000 | 2300 | 500 |
| 107 | 32000 | 4000 | 500 |
| 114 | 12000 | 5200 | 100 |
| 109 | 42000 | 1700 | 200 |
| 105 | 18900 | 1690 | 300 |
| 130 | 21700 | 2600 | 300 |
(a) Display NAME of all doctors who are in MEDICINE department having more than 10 yrs experience from the table DOCTOR.
(b) Display the average salary of all doctors working in ENT department using the tables DOCTOR and SALARY.SALARY=BASIC+ ALLOWANCE.
(c) Display the minimum ALLOWANCE of female doctors.
(d) Display the highest consultation fee among all male doctors.
(e) SELECT COUNT(*) FROM DOCTOR WHERE SEX='F';
(f) SELECT NAME, DEPT, BASIC FROM DOCTOR, SALARY
WHERE DEPT='ENT' AND DOCTOR.ID=SALARY.ID;
10.
Write SQL commands for (a) to (f) and write the outputs for (g) on the basis of table STUDENT
TABLE: STUDENT
| SNO | NAME | STREAM | FEES | AGE | SEX |
| 1 | ARUN KUMAR | COMPUTER | 750.00 | 17 | M |
| 2 | DIVYA JENEJA | COMPUTER | 750.00 | 18 | F |
| 3 | KESHAR MEHRA | BIOLOGY | 500.00 | 16 | M |
| 4 | HARISH SINGH | ENG.DR | 350.00 | 18 | M |
| 5 | PRACHI | ECONOMICS | 300.00 | 19 | F |
| 6 | NISHA ARORA | COMPUTER | 750.00 | 15 | F |
| 7 | DEEPAK KUMAR | ECONOMICS | 300.00 | 16 | M |
| 8 | SARIKA VASWANI | BIOLOGY | 500.00 | 15 | F |
(a) List the name of all students, who have taken stream as COMPUTER.
(b) To count the number of female students.
(c) To display the number of students stream wise.
(d) To insert a new row in the STUDENT table
9,'KARISHMA','ECONOMICS',300.18,'F'
(e) To display a report, listing NAME, STREAM,SEX and stipend, where stipend is 20% of fees.
(f) To display all the records in sorted order of name.
(g) Give the output of the following SQL statements based on STUDENT table:
(i) SELECT AVG(FEES) FROM STUDENT WHERE STREAM='COMPUTER';
(ii) SELECT MAX(AGE) FROM STUDENT;
(iii) SELECT COUNT(DISTINCT STREAM) FROM STUDENT;
(iv) SELECT SUM(FEES) FROM STUDENT GROUP BY STREAM;
11.
Consider the following tables GARMENT and FABRIC. Write SQL commands for the statements (a) to (d) and give outputs for SQL queries (e) to (h).
TABLE: GARMENT
| GCODE | DESRIPTION | PRICE | FCODE | READYDATE |
| 10023 | PENCIL SKIRT | 1150 | F03 | 19-DEC-08 |
| 10001 | FORMAL SHIRT | 1250 | F01 | 12-JAN-08 |
| 10012 | INFORMAL SHIRT | 1550 | F02 | 06-JUN-08 |
| 10024 | BABY TOP | 750 | F03 | 07-APR-07 |
| 10090 | TULIP SKIRT | 850 | F02 | 31-MAR-07 |
| 10019 | EVENING GOWN | 850 | F03 | 06-JUN-08 |
| 10009 | INFORMAL PANT | 1500 | F02 | 20-OCT-08 |
| 10007 | FORMAL PANT | 1350 | F01 | 09-MAR-08 |
| 10020 | FROCK | 850 | F04 | 09-SEP-07 |
| 10089 | SLACKS | 750 | F03 | 20-OCT-08 |
TABLE: FABRIC
| FCODE | TYPE |
| F04 | POLYSTER |
| F02 | COTTON |
| F03 | SILK |
| F01 | TERELENE |
(a) To display GCODE and DESCRIPTION of each GARMENT in descending order of GCODE.
(b) To display the details of all the GARMENTs, which have READYDATE in between 08-DEC-07 and 16-JUN-08(inclusive of both the dates)
(c) To display the average PRICE of all the GARMENTs. Which are made up of FABRIC with FCODE as F03.
(d) To display FABRIC wise highest and lowest price of GARMENTS from GARMENT table.(Display FCODE of each GARMENT along with highest and lowest price.)
(e)SELECT SUM(PRICE) FROM GARMENT WHERE FCODE='F01';
(f) SELECT DESCRIPTION , TYPE FROM GARMENT, FABRIC
WHERE GARMENT.FCODE=FABRIC.FCODE AND GARMENT.PRICE>=1260;
(g) SELECT MAX(FCODE) FROM FABRIC;
(h) SELECT COUNT(DISTINCT PRICE) FROM GARMENT;
12.
Write SQL queries for (a) to (f) and write the outputs for (g) parts (i) to (iv) on the basis of tables APPLICANTS and COURSES.
TABLE: APPLICANTS
| No | NAME | FEE | GENDER | C_ID | JOINYEAR |
| 1012 | Amandeep | 30000 | M | A01 | 2012 |
| 1102 | Avisha | 25000 | F | A02 | 2009 |
| 1103 | Ekant | 30000 | M | A02 | 2011 |
| 1049 | Arun | 30000 | M | A03 | 2009 |
| 1025 | Amber | 40000 | M | A02 | 2011 |
| 1106 | Ela | 40000 | F | A05 | 2010 |
| 1017 | Nikita | 35000 | F | A03 | 2012 |
| 1108 | Arluna | 30000 | F | A03 | 2012 |
| 2109 | Shakti | 35000 | M | A04 | 2011 |
| 1101 | Kirat | 25000 | M | A01 | 2012 |
TABLE: COURSES
| C_ID | COURSES |
| A01 | FASHION DESIGN |
| A02 | NETWORKING |
| A03 | HOTEL MANAGEMENT |
| A04 | EVENT MANAGEMENT |
| A05 | OFFICE MANAGEMENT |
(a) To display NAME, FEE, Gender, JOINYEAR about the APPLICANTS, who have joined
before 2010.
(b) To display the names of applicants, who are paying FEE more than 30000.
(c) To display the names of all applicants in ascending order of their joinyear.
(d) To display the year and the total number of applicants joined in each year
from the table APPLICANTS>
(e) To display the C_ID and the number of applicants registered in the course
from the APPLICANTS table.
(f) To display the applicant's name with their respective course's name from the
tables APPLICANTS and COURSES.
(g) Give the output of the following SQL statements:
(i) SELECT NAME,JOINYEAR FROM APPLICANTS WHERE GENDER='F' AND C_ID='A02';
(ii) SELECT MIN(JOINYEAR) FROM APPLICANTS WHERE GENDER='M';
(iii) SELECT AVG(FEE) FROM APPLICANTS WHERE C_ID='A01' OR C_ID='A05';
(iv) SELECT SUM(FEE), C_ID FROM APPLICANTS GROUP BY C_ID HAVING COUNT(*)=2;
1.
Step 1 Simplify the given expression using appropriate theorems/ rules.
\((\overset { \_ \_ \_ \_ \_ \_ \_ }{ \bar { X } .Y } ).(\overset { \_ \_ \_ \_ \_ \_ \_ \_ }{ \bar { X } .\bar { Z } } )=(\overset { \_ \_ \_ }{ \bar { X } } +\bar { Y } ).(\overset { \_ \_ \_ }{ \bar { X } } +\overset { \_ \_ \_ }{ \bar { Z } } )\\ =(X+\bar { } ).(X+Z)\\ =X.X+X.Z+X.\bar { Y } +\bar { Y } .Z\\ =X+X.Z+X.\bar { Y } +\bar { Y } .Z\\ =X.(1+Z)+X.\bar { Y } +\bar { Y } .Z\\ =X+X.\bar { Y } +\bar { Y } .Z\\ =X(1+\bar { Y } )+\bar { Y } .Z=X+\bar { Y } .Z\)
Since it is a 3 variables expression, a product term must have all 3 variables.
Step 2 Wherever a variable is missing, multiply that term with (missing variable+ compliment of missing variable)
\(=X.(Y+\bar { Y } ).(Z+\bar { Z } )+(X+\bar { X } ).\bar { Y } .Z\\ =(X.Y+X.\bar { Y } ).(Z+\bar { Z } )+X.\bar { Y } .Z+\bar { X } .\bar { Y } .Z\\ =X.Y.Z+X.Y.\bar { Z } +X.\bar { Y } .Z+X.\bar { Y } .\bar { Z } +X.\bar { Y } .Z+\bar { X } .\bar { Y } .Z\)
Step 3 Remove all duplicate term, i.e.,
\(=X.Y.Z+X.Y.\bar { Z } +X.\bar { Y } .Z+X.\bar { Y } .\bar { Z } +\bar { X } .\bar { Y } .Z\)
This is the desired canonical Sum of Products form.
2.
(i) Candidate Keys CID, ITEM
(ii) Primary key CID
3.
The normalisation is the process of transformation of the relationship among data elements in a record.Normalisation replaces a collection of data in a record structure by another record design which is simpler, more predictable and therefore more manageable.
4.
To find all suppliers who reside in Noida
\(\sigma \quad city='Noida'(Supplier)\\ \swarrow \quad \quad \quad \downarrow \quad \quad \quad \quad \quad \quad \quad \downarrow \)
Selection Condition Table name
operator
The resultant table from query is:
| Super code | Last name | First name | City |
| 1 | jain | Anuj | Noida |
| 4 | Gupta | Satish | Noida |
5.
( )
NAND and NOR gates are easier to design and basic functions like AND, OR and NOT, etc., can be easily implemented using NAND/NOR gates. So, these gates are called Universal gates.
6.
( )
2N input combinations can be there in the truth table of a logic system.
7.
( )
i)Select P_Name MAX(SAL) FROM PROGRAMMERS;
ii)UPDATE PROGRAMMERS SET SAL=SAL+2000 WHERE P_NAME LIKE "R%';
8.
(a) SELECT NAME FROM SPORTS WHERE GRADE ='C' OR GRADE1='C';
(b) SELECT COUNT (*) FROM SPORTS
WHERE (GAME1='CRICKET' AND GRADE='A') OR (GAME2='CRICKET'AND GRADE1='A');
(c) SELECT NAME FROM SPORTS WHERE GAME1=GAME2;
(d) SELECT GAME1, GAME2 FROM SPORTS WHERE NAME LIKE 'A%';
(e) ALTER TABLE SPORTS ADD(MARKS NUMBER(3));
(f) UPDATE SPORTS SET MARKS=200
WHERE GRADE ='A' OR GRADE='B' OR GRADE1='A' OR GRADE1='B';
(g) SELECT * FROM SPORTS ORDER BY NAME;
9.
(a) SELECT NAME FROM DOCTOR WHERE EDPT ='MEDICINE' AN EXPERIENCE>10;
(b) SELECT AVG(BASIC+ALLOWANCE) FROM SALARY WHERE SALARY.ID IN(SELECT ID FROM DOCTOR WHERE DEPT='ENT');
(c) SELECT MIN(ALLOWANCE) FROM SALARY WHERE SALARY.ID IN(SELECT ID FROM DOCTORE WHERE SEX='F');
(d) SELECT MAX(CONSULTATION) FROM SALARY .ID IN(SELECT ID FROM DOCTOR WHERE SEX='M');
(e)
| COUNT(*) |
| 4 |
(f)
| NAME | DEPT | BASIC |
| John | ENT | 12000 |
10.
(a) SELECT NAME FROM STUDEnT WHERE STREAM ='COMPUTER';
(b) SELECT COUNT(*) FROM STUDENT WHERE SEX='F';
(c) SELECT STREAM, COUNT(*) FROM STUDENT GROUP BY STREAM;
(d) INSERT INTO STUDENT VALUES(9,'KARISHMA','ECONOMICS',300.18,'F');
(e) SELECT NAME, STREAM, SEX, FEES*20/100 'STIPEND' FROM STUDENT;
(f) SELECT * FROM STUENT ORDER BY NAME;
(g) The output is given after excluding the row given in part(f).
(i)
| AVG(FEES) |
| 750.00 |
(ii)
| MAX(AGE) |
| 19 |
(iii)
| COUNT(DISTINCT STREAM) |
| 4 |
(iv)
| SUM(FEES) |
| 225.00 |
| 1000.00 |
| 350.00 |
| 600.00 |
11.
(a) SELECT GCODE, DESCRIPTION FROM GARMENT;
(b) SELECT*FROM GARMENT
WHERE READYDATE BETWEEN '08-DEC-07' AND '16-JUN-08';
(c) SELECT AVG(PRICE) FROM GARMENT WHERE FCODE='F03';
(d) SELECT FCODE, MAX(PRICE), MIN(PRICE) FROM GARMENT GROUP BY FCODE;
(e)
| SUM(PRICE) |
| 2600 |
(f)
| DESCRIPTION | TYPE |
| INFORMAL SHIRT | COTTON |
| INFORMAL PANT | COTTON |
| FORMAL PANT | TERELENE |
(g)
| MAX(FCODE) |
| F04 |
(h)
| COUNT(DISTINCT PRICE) |
| 7 |
12.
a) SELECT NAME, FEE, GENDER, JOINYEAR FROM APPLICANTS WHERE JOINYEAR<2010;
(b) SELECT NAME FROM APPLICANTS WHERE FEE>30000;
(c) SELECT NAME FROM APPLICANTS ORDER BY JOINYEAR;
(d) SELECT JOINYEAR, COUNT(*) FROM APPLICANTS GROUP BY JOINYEAR;
(e) SELECT C_ID, COUNT(*) FROM APPLICANTS GROUP BY C_ID;
(f) SELECT NAME, COURSE FROM APPLICANTS, COURSES WHERE APPLICANTS.C_ID=COURSES.C_ID;
(g) (i)
| NAME | JOINYEAR |
| Avisha | 2009 |
(ii)
| MIN(JOIN YEAR) |
| 2009 |
(iii)
| AVG(FEE) |
| 31666.666 |
(iv)
| SUM(FEE) | C_ID |
| 55000 | A01 |
12th Standard CBSE Syllabus & Materials
12th Standard CBSE
CBSE 12th Computer Science Python Revision Tour I - New Previous year Question Papers Study Material - QB365 Set A
NEW12th Standard CBSE
CBSE 12th Business Studies Planning Important Questions And Answers Study Material - QB365 Set A
NEW12th Standard CBSE
CBSE 12th Business Studies Business Environment Important Questions And Answers Study Material - QB365 Set A
NEW12th Standard CBSE
CBSE 12th Business Studies Principles of Management Important Questions And Answers Study Material - QB365 Set A
CBSE 12th Standard CBSE Subjects
CBSE Standards