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: 29/11/2018
The Central Board of Secondary Education conducts the Class 12 examinations in the months of March every year. Students must be prepared for these examinations and one way to do so is by solving question mock papers. The CBSE sample papers for class 12 help students identify frequently asked questions, topics that need to be focused on, types of trick questions, and much more. Anyone can download the CBSE sample papers for class 12 with free PDF solution to test their problem-solving ability. Students who have opted for the science stream require a lot of practice in the form of mock tests and sample papers. This will enable them to write the final board exam with confidence. By going through the CBSE solved sample papers for class 12, you can better understand mistakes and develop a deeper understanding of these subjects.
CBSE Class 12 Computer Science always important to practice last year board exam question paper to practice for the upcoming board exams. Here the questions are covered from last 10 years which you should practice understanding the paper pattern and type of questions which have come in previous board exams for class 12. This will help you to get better marks in class 12 board exams. Practice getting better marks in board exams.
In this question paper, the questions are covered from the entire syllabus of 12th Computer Science. Questions are prepared as per NCERT guideline with the help of expert teachers.
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 \(\bar { X } .Y+Y.(\bar { Z } (\bar { Z } +Y))\) into canonical product of sums form.
2.
c^^
3.
What is the relationship between class and object?Illustrate with a suitable example.
4.
QUEUE is a queue with 6 memory locations and with Front=2, Rear=5. Indexing should be start from 1.QUEUE:......., Lindon, Berlin, Rome, Paris,........Where......, denoted empty locations.
Diagrammatically display the queue including Front and Rear as the following operations take place:
(i) Athens is added
(ii) Two cities are deleted
(iii) Madrid is added
(iv) Moscow is added
(v) Three cities are deleted
(vi) Oslo is added
5.
What is the difference between #define and const? Explain with suitable example.
6.
To show the use of goto statement.
7.
Write a function QDELETE() in C++ to perform delete operation on a Linked Queue, which contains Passenger number and Passenger name.Consider the following definition of node in the code:
struct node
{
long int Pno;
char Pname[20];
node *Link;
};
8.
Answer the questions (a) and (b) on the basis of the following tables SHOPPE and ACCESSORIES.
TABLE SHOPPE
| Id | SName | Area |
| S001 | ABC Computeronics | CP |
| S002 | All Infotech Media | GK II |
| S003 | Tech Shoppe | CP |
| S004 | Geeks Tecno Soft | Nehru Place |
| S005 | Hitech Tech Store | Nehru Place |
TABLE ACCESSORIES
| No | Name | Price | Id |
| A01 | Mother Board | 12000 | S01 |
| A02 | Hard Disk | 5000 | S01 |
| A03 | Keyboard | 500 | S02 |
| A04 | Mouse | 300 | S01 |
| A05 | Mother Board | 13000 | S02 |
| A06 | Keyboard | 400 | S03 |
| A07 | LCD | 6000 | S04 |
| T08 | LCD | 5500 | S05 |
| T09 | Mouse | 350 | S05 |
| T10 | Hard Disk | 4500 | S03 |
(a) Write the SQL queries:
(i) To display Name and price of all the Accessories in ascending order of their price.
(ii) To display id and Sname of all Shoppe located in Nehru place.
(iii) To display Minimum and Maximum price of each Name of Accessories.
(iv) To display Name,Price of all Accessories and their respective SName,where they are available.
(b) Write the output of the following SQL commands;
(i) SELECT DISTINCT NAME FROM ACCESSORIES WHERE PRICE>=5000;
(ii)SELECT AREA.COUNT (*) FROM SHOPPE GROUP BY AREA;
(iii)SELECT COUNT (DISTINCT AREA) FROM SHOPPE;
(iv)SELECT NAME,PRICE*0.05 DISCOUNT FROM ACCESSORIES WHERESNO IN ('S02','S03');
9.
Write two applications of cyber law:
10.
Write a query on the SALESPEOPLE table, whose output will exclude all salespeople with a rating >=100, unless they are located in Delhi.
11.
What are nested structures? Give an example.
12.
A function printing is defined as
void printing(char c= '*', int l=40)
{
for(int x=0;x<1;x++)
cout<<c;
cout<<endl;
}
How will you invoke the function printing for following output:
i) to print '*' 40 times
ii) to print '=' 30 times
13.
Write the names of the header files, which is/are essentially required to run/execute the following C++ code.
void main()
{
char CH,Text[]="+ve Attitude";
for(int I=0;Text[I]!='\0';I++)
if(Text[I]==' ')
cout<<endl;
else
{
CH=toupper(Text[I]);
cout<<CH;
}
}
14.
Observe the following C++ code and write the name(s) of the header file(s), which will be essentially required to run it in a C++ compiler.
void main()
{
char Text[20],C;
cin>>Text;
C=tolower(Text[0]);
cout<<c<<"is the first char of"<<Text<<endl;
}
15.
Write declaration for two overloadded functions named bar().They both return float type.the first takes one argument of type char and second takes two argument of type char.If this impossible,explain why?
16.
Generally there are four data types, each of which can be signed or unsigned.Write names of all four data types.
17.
Write SQL commands for (a) to (g) and write the outputs for (h) on the basis of table COLLEGE
TABLE: COLLEGE
| No | Name | Age | Department | Dateof Join | Basic | Sex |
| 1 | Shalaz | 45 | Biology | 13/02/88 | 10500 | M |
| 2 | Sammera | 54 | Biology | 10/01/90 | 9500 | F |
| 3 | Yagyen | 43 | Physics | 27/02/98 | 8500 | M |
| 4 | Pratyush | 34 | Chemistry | 11/01/93 | 7500 | M |
| 5 | Aren | 51 | Mathematics | 22/01/91 | 8500 | M |
| 6 | Reeta | 27 | Chemistry | 14/02/94 | 9000 | F |
| 7 | Urvashi | 29 | Biology | 10/02/93 | 8500 | F |
| 8 | Teena | 35 | Mathematics | 02/02/89 | 10500 | F |
| 9 | Viren | 49 | Mathematics | 03/01/88 | 9000 | M |
| 10 | Prakash | 22 | Physics | 17/02/92 | 8000 | M |
(a) To change the Basic salary to 10500 of all those teachers from college who joined the COLLEGE after 01/02/89 and are above the age of 50.
(b) To display Name, Age and Basic of all those from COLLEGE, who belong to Physics and Chemistry department only.
(c) To display all the department names from COLLEGE with no duplication.
(d) To list names of all teachers from COLLEGE with their date of joining in ascending order within their Basic salaries in ascending order.
(e) To display maximum salary amongst the female teachers and also amongst the male teachers from COLLEGE.(Give a single command)
(f) To insert a new row in the table COLLEGE with the following data:
15,"ATIN",27,"Physics",'15/05/02',8500,"M"
(g) To delete a row from table COLLEGE in which NAME is VIREN.
(h) Give the output of the following SQL statements:
(i) SELECT COUNT(Name) FROM COLLEGE;
(ii) SELECT MIN(Basic)FROM COLLEGE WHERE Age>40;
18.
Write SQL queries for (a) to (f) and write the output for the SQL queries mentioned in (g) parts (i) to (iv) on the basis of tables ITEMS and TRADERS.
TABLE: ITEMS
| code | IName | Qty | price | company | Tcode |
| 1001 | DIGITAL PAD 121 | 120 | 11000 | XENITA | T01 |
| 1006 | LED SCREEN 40 | 70 | 38000 | SANTORA | T02 |
| 1004 | CAR GPS SYSTEM | 50 | 2150 | GEOKNOW | T01 |
| 1003 | DIGITAL CAMERA 12X | 160 | 8000 | DIGICLICK | T02 |
| 1005 | PEN DRIVE 32 GB | 600 | 1200 | STOREHOME | T03 |
TABLE: TRADERS
| Tcode | TName | City |
| T01 | ELECTRONIC SALES | MUMBAI |
| T03 | BUSY STORE CORP | DELHI |
| T02 | DISP HOUSE INC | CHENNAI |
(a) To display the details of all the items in ascending order of item names(i.e. INAME).
(b) To display item name and price of all those items whose price is in the range of 10000 nd 22000(both values inclusive)
(c) To display the number of items, which are traded by each trader. The expected output of this query should be:
| T01 | 2 |
| T03 | 1 |
| T02 | 2 |
(d) To display the Price, item name(ie.name) and quantity(ie.Qty) of those items, which have quantity more than 150.
(e) To display the names of those traders, who are either from DELHI or from MUMBAI.
(f) To display the name of the companies and the name of the items in descending order of company names.
(g) Obtain the outputs of the following SQL queries based on the data given in the tables ITEMS and TRADERS above.
(i) SELECT MAX(Price), MIN(Price) FROM ITEMS;
(ii) SELECT Price * Qty AMOUNT
FROM ITEMS WHERE Code=1004;
(iii) SELECT DISTINCT Tcode FROM ITEMS;
(iv) SELECT IName, TName
FROM ITEMS I, TRADERS T
WHERE I.Code=T.TCode AND Qty<100;
1.
Step 1 Simplify the given expression using appropriate theorems/rules.
\(\bar { X } .Y+Y.(\bar { Z } (\bar { Z } +Y))=\bar { X } .Y+Y.(\bar { Z } .\bar { Z } +\bar { Z } .Y)\quad \quad \quad \quad [By\quad using\quad Distributive\quad law]\\ =\bar { X } .Y+Y.(\bar { Z } +\bar { Z } .Y)\quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad [\because \quad \bar { Z } .\bar { Z } =\bar { Z } ]\\ =\bar { X } .Y+Y.\bar { Z } .(1+Y)\\ =\bar { X } .Y+Y.\bar { Z } .1\quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad [\because \quad 1+Y=1]\\ =\bar { X } .Y+Y.\bar { Z } \\ \\ \)
Step 2 To convert into POS form applying the boolean algebra rule
\(\bar { X } .Y+Y.\bar { Y } =(\bar { X } .Y+Y).(\bar { X } .Y+\bar { Z } )\\ \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad [\because \quad X+Y.Z=(X+Y).(X+Z)]\\ =(Y+\bar { X } .Y).(\bar { Z } +\bar { X } .Y)\quad \quad [\because X+Y=Y+X]\\ =(Y+\bar { X } ).(Y+Y).(\bar { Z } +\bar { X } ).(\bar { Z } +Y)\\ =(\bar { X } +Y).(Y).(\bar { X } +\bar { Z } ).(Y+\bar { Z } )\quad \quad [\because \quad Y+Y=Y)\)
Step 3 Wherever a variable is missing, ad that term with (missing variable. complement of missing variable)
\(=(\bar { X } +Y+Z.\bar { Z } ).(X.\bar { X } +Y+Z.\bar { Z } ).(\bar { X } +Y.\bar { Y } +\bar { Z } ).(X.\bar { X } +Y+\bar { Z } )\\ =(\bar { X } +Y+Z).(\bar { X } +Y+\bar { Z } ).(X.\bar { X } +Y+Z).(X.\bar { X } +Y+\bar { Z } ).(\bar { X } +Y+\bar { Z } ).(\bar { X } +\bar { Y } +\bar { Z } ).((X+Y+\bar { Z } ).(\bar { X } +Y+\bar { Z } )\\ =(\bar { X } +Y+Z).(\bar { X } +Y+\bar { Z } ).(X+Y+Z).(\bar { X } +Y+Z).(X+Y+\bar { Z } ).(\bar { X } +Y+\bar { Z } ).(\bar { X } +Y+\bar { Z } ).(\bar { X } +\bar { Y } +\bar { Z } ).((X+Y+\bar { Z } ).(\bar { X } +Y+\bar { Z } )\\ \)
Step 4 Remove all duplicate terms, i.e.,
\(=(\bar { X } +Y+Z).(\bar { X } +Y+\bar { Z } ).(X+Y+Z).(X+Y+\bar { Z } ).(\bar { X } +\bar { Y } +\bar { Z } )\\ \)
This is the desired canonical Product of Sums form.
2.
C^^
3.
A class cannot be assigned to memory until the object is created.An object is a class variable, i.e. class is a data type and object is a variable of class type.Without class, object instantiation is not possible.Hence, we can say that an object does not exist without class and a class has no value without object.So, they are related to each other.
e.g. A class Box is given as follows:
class Box
{
int height;
int width;
int length;
public:
double volume (int h, int w, int l)
{
height = h;
width = w;
length = l;
return (height * width * length);
}
} ;
The above class will not assigned memory until the object is instantiated.
The object instantiation is given below:
Box b1;
After the object instantiated it will take place in memory.
Box:b1
| height width length |
| volume() |
4.
The given queue is as follow:
1 2 3 4 5 6
| London | Berlin | Rome | Paris |
Front Rear
(i) Athens is added
1 2 3 4 5 6
| London | Berlin | Rome | Paris | Athens |
Front Rear
(iii) Madrid is added, overflow occurs because queue is full. Insertion is not possible.
(iv) Moscow is added, overflow occurs because queue is full.Insertion is not possible.
(v) Three cities are deleted
1 2 3 4 5 6
\(\uparrow \)
Front,Rear
If Front=Rear, it means queue is empty.Reset the Front=0 and Rear=0.
(vi) Oslo is Added
1 2 3 4 5 6
| oslo |
Front,Rear
5.
#define preprocessor directive is used to define a macro with some value/expression, which is substituted during compilation of program. Unlike variable, it does not occupy memory. e.g.
#define Max 10
void main()
{
int arr[Max];
}
Const It is used in declaration of variable, it occupies memory to store a constant value, which once initialised cannot be changed
e.g. const int x=10;
6.
#include<iostream.h>
#include<conio.h>
void main()
{
int i, j;
for(i=0; i<10; i++)
{
cout<<"\n Outer loop executing. i="<<i;
for(j=0; j<2; j++)
{
cout<<"\n Inner loop executing. j="<<j;
if(i==3)
goto stop;
}
}
cout<<"\n Loop exited. i="<<i;
stop;
//This message does not print
cout<<"\n Jumped to stop. i="<<i;
getch();
}
Output
Outer loop executing. i=0
Inner loop executing. j=0
Inner loop executing. j=1
Outer loop executing. i=1
Inner loop executing. j=0
Inner loop executing. j=1
Outer loop executing. i=2
Inner loop executing. j=0
Inner loop executing. j=1
Outer loop executing. i=3
Inner loop executing. j=0
Jumped to stop. i=3
7.
void QDELETE()
{
if( Front == NULL)
{
cout<<"Stack is empty";
exit(0):
}
else
{
node *temp;
cout<<"Passenger Information\n";
cout<<"Number:"<<Front->Pno<<end1;
cout<<"Name:"<<Front->Pname;
temp = Front;
Front = Front -> Link;
delete temp;
}
}
8.
(a)(i) SELECT Name, Price
FROM ACCESSORIES
ORDER BY Price;
(ii) SELECT Id, SName
FROM SHOPPE
WHERE Area='Nehru Place';|
(iii) SELECT MIN(Price)"Minimum Price",
MAX(Price) "Maximum Price", Name
FROM ACCESSORIES
GROUP BY Name;
(iv) SELECT Name,Price, SName
FROM ACCESSORIES A, SHOPPE S
WHERE A.Id=S.Id;
but this query enable to show the result because A.Id and S.Id are not identical.
(b)(i)
| NAME |
| MotherBoard |
| Hard Disk |
| LCD |
(ii)
| AREA | COUNT(*) |
| GK II | 1 |
| Nehru Place | 2 |
| CP | 2 |
(iii)
| Count(Distinct area) |
| 3 |
(iv) The given query will result in an error as there is no column named SNo in ACCESSORIES table.
9.
( )
The two applications of cyber law:
(i) This law should be enforced between the two parties while making an agreement for transactions by using the cyber technology.
(ii) This law forms the basis of any legal penal action to be taken against the party, who has committed any kind of cyber crime.
10.
( )
SELECT * FROM SALESPEOPLE
WHERE rating<100 or city='Delhi';
SELECT*FROM SALESPEOPLE WHERE NOT rating>=100 OR city ='Delhi';
SELECT*FROM SALESPEOPLE WHERE NOT(rating>=100 AND city<>'Delhi');
11.
( )
A structure declared within another structure is called nested structure.
e.g.
struct Record
{
int rollno;
struct student
{
char fn[10];
char mn[10];
char ln[10];
};
char st_class;
char section;
};
12.
( )
i) printing();
ii) printing('=', 30);
13.
( )
iostream.h ---->cout
ctype.h ----> toupper()
14.
( )
iostream.h ---> cout,cin
ctype.h -----> tolower()
15.
( )
Decleration of function is possible with overlading concept:
float bar(char ch)
{
__
__ statements
}
float bar(char ch1,char ch2)
{
__
__ statements
}
16.
( )
The four data types are : char,short, int and long.
17.
(a)UPDATE COLLEGE SET Basic=10500
WHERE DateofJoin>'01/02/89' AND Age>50;
(b) SELECT Name, Age, Basic From COLLEGE
WHERE Department='Physics' OR Department='Chemistry';
(c)SELECT DISTINCT Department FROM COLLEGE;
(d) SELECT Name, DateofJoin, Basic FROM COLLEGE ORDER BY Basic, DateofJoin;
(e) SELECT MAX(Basic) FROM COLLEGE GROUP BY SEX;
(f) INSERT INTO COLLEGE VALUES(15,'ATIN',27 'Physics','15/05/02'8500,'M');
(g) DELETE FROM COLLEGE WHERE Name='VIREN';
(h) The output is given after excluding the insertion and deletion of rows performing in above queries.
(i)
| COUNT(Name) |
| 10 |
(ii)
| MIN(Basic) |
| 8500 |
18.
(a) SELECT *FROM ITEMS ORDER BY IName;
(b) SELECT IName, Price FROM ITEMS
WHERE Price BETWEEN 10000 AND 22000;
(c) SELECT TCode, COUNT(*) FROM ITEMS
GROUP BY TCode;
(d) SELECT Price, IName, Qty
FROM ITEMS
WHERE Qty>150;
(e) SELECT TName
FROM TRADERS
WHERE City ='MUMBAI' OR City='DELHI';
(f) SELECT Company, IName
FROM ITEMS
ORDER BY Company DESC;
(g) (i)
| MAX(Price) | MIN(Price) |
| 38000 | 1200 |
(ii)
| AMOUNT |
| 107500 |
(iii)
| TCode |
| T01 |
| T02 |
| T03 |
(iv)
| IName | TName |
| CAR GPS SYSTEM | ELECTRONIC SALES |
| LED SCREEN 40 | DISP HOUSE INC |
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