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: 03/03/2020
12th Standard CBSE Computer Science Public Exam Sample Question 2020
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.
Write a function in C++ to print the count of the word the as an independent word in a text file STORY.TXT. For example, if the content of the file STORY.TXT is
There was a monkey in the zoo.
The monkey was very naughty.
Then the output of the program should be 2.
2.
State and verify associative law.
3.
State and verify distributive law in boolean algebra.
4.
Explain the following terms in short:
(i) DHTML
(ii) ISP
5.
Write a function in c++, that accepts two equal length character array and compare each letter of array, display the greater letter one time more than as many time as the subscript of that element.e.g.two arrays input are Shyam and Mohan so the program produces the following output:
S
oo
yyy
aaaa
nnnnn
6.
Find the output of the following program from the outputs given:
#include<stdlib.h>
#include<iostream.h>
void main()
{
randomize();
char city[][10]={"DEL","CHN","KOL","BOM","BNG"};
int Fly;
for(int I=0;I<3;I++)
{
Fly=random(2)+1;
cout<<city[Fly]<<";";
}
}
Output
i) DEL:CHN:KOL:
ii) CHN:KOL:CHN:
iii) KOL:BOM:BNG:
iv) KOL:CHN:KOL:
7.
Write code for a function void Convert(int T[], int Num) in c++, which reposition all the elements of the array by shifting the element to the last position.
| 0 | 1 | 2 | 3 | 4 |
| 22 | 25 | 70 | 32 | 12 |
The changed content will be:
| 0 | 1 | 2 | 3 | 4 |
| 25 | 70 | 32 | 12 | 22 |
8.
The following code is from a game which generates a set of 4 random numbers.Praful is playing this game, help him to identify the correct option(5) out of the four choices given below as the possible set of such numbers generated from the program code so that he wins the game.Justify your answer.
#include<iostream.h>
#include<stdlib.h>
const int low=25;
void main()
{
randomize();
int POINT=5,Number;
for(int I=1;I<=4;I++)
{
Number=low+random(POINT);
cout<<Number<<":";
POINT--;
}
}
i) 29:26:25:28: ii) 24:28:25:26: iii) 29:26:24:28:
iv) 29:26:25:26:
9.
Rewrite the following program after removing the syntatical error(s) (if any).Underline each correction.
#include
#include
class OFFER
{
int offerId;
char Description[80];
Void show
{
cout<
public
void Enter
{
cin>>offerId;gets>>Description;
}
};
void main()
{
offer obj;
obj.Enter();
obj.show();
}
10.
Find the output of the following program:
#include<iostream.h>
void main()
{
long NUM=1234543;
int F=0; S=0;
do
{
int Rem = NUM;
if(Rem%2 I=0)
F +=Rem;
else
S +=Rem
NUM /=10;
} while(NUM>0);
cout<<F-S;
}
11.
With the multiple definition of single function name, what makes them significantly different?
12.
What is the difference between degree and cardinality of a table? What is the degree and cardinality of the following table?
| Eno | Name | salary |
| 101 | John Fedrick | 45000 |
| 102 | Raya Mazumdar | 50600 |
Differentiate between the terms degree and cardinality in context of RDBMS.
13.
Find output
#include < iostream.h >
struct Box {
int Len, Bre, Hei;
};
void Dimension(Box B)
{
cout << B.Len << “ X ” << B.Bre << “ X ”;
cout << B.Hei << endl;
}
void main ( )
{
Box B1 = {10, 20, 8}, B2, B3;
++B1.Hei;
Dimension (B1);
B3= B1;
++B3.Len;
B3.Bre++;
Dimension (B3);
B2= B3;
B2.Hei += 5;
B2.Len - = 2;
Dimension (B2);
}
14.
Give output of following code fragment:
char *msg = “a
ProFile”;
for (int i = 0; i < strlen (msg); i++)
if (islower(msg[i]))
msg[i] = toupper (msg[i]);
else
if (isupper(msg[i]))
if( i % 2 != 0) msg[i] = tolower (msg[i-1]);
else
msg[i--];
cout << msg << endl;
15.
Simplify for the function F=π(0,3,7,8,9,12,13)
16.
Reduce the following Boolan Expression using K-Map:
F(U,V,W,Z)=\(\pi\) (0,1,2,3,4,5,6,810,1)
17.
Convert the following infix expression into postfix expression using stack show the status of the stack after every step
(((A+B)-C)*(D-E))
18.
Give the output of the following program segment (assume all required header files are include in the program)
void main()
{
char *NAME="a ProFile";
for(int x=0;x<strlen(NAME);x++)
if(islower(NAME[x]));
else
if(isupper(NAME[x]))
if(x%2!=0)
NAME[x]=tolower(NAME[x-1]);
else
NAME[x]--;
cout<<NAME<<end1;
}
19.
To pass the structure elements to function.
20.
Rewrite the following program after removing the syntactical error(s), (if any). Underline each correction.
#include<iostream.h>
const int Multiple 3;
void main()
{
value = 15;
for( int Counter=1; Counter=<5; Counter++, value-=2)
if(value%Multiple==0)
cout<<Value*Multiple;
cout<<endl;
else
cout<<Value+Multiple<<endl;
}
21.
Answer the questions (i) to (iv) based on the following code:
class MNC
{
char Cname[25];
protected: char Hoffice[25];
public : MNC( );
char Country[25];
void EnterDate( );
void DisplayData( );
};
class BRANCH:public MNC
{
long NOE;
char Ctry[25] ;
protected:
void Association( );
public: BRANCH( );
void Add( );
void Show( );
};
class OUTLET:
public BRANCH
{
char State[25];
public:
OUTLET( );
void Enter( );
void Output( );
};
a) Which class’s constructor will be called first at the time of declaration of an object of class OUTLET.
b) How many bytes an object belonging to class OUTLET require?
c) Name the member function(s) which are accessed from the object(S) of class OUTLET.
d) Name the Data members which are accessible from the objects(s) of class BRANCH
22.
An array ARR[10][20] is stored in the memory with each element occupying 2 bytes of space. Assuming the base address of ARR to be 800,compute the address of ARR[9][11], when the array is stored as :
i) Row wise ii) Column wise
23.
Consider the following statements
Char ch,ch1=’A’;
Char *p,*p1=&ch1;
*p1=ch1+1;
*p=ch1+1;
*p=ch;
24.
Answer the questions(i) to (iv) based on the following :
class cloth
{
char category[5];
char description[25];
protected:
float price; public:
void Entercloth( );
void dispcloth( );
};
class Design :
protected cloth
{
char design[21];
protected:
float cost_of_cloth;
public:
int design_code;
Design( );
void Enterdesign( );
void dispdesign( );
};
class costing :
public cloth
{
float designfee;
float stiching;
float cal_cp( );
protected:
float costprice;
float sellprice;
public:
void Entercost( );
void dispcost( );
costing ( ) { };
};
(i) Write the names of data members which are accessible from objects belonging to class cloth.
(ii) Write the names of all the members which are accessible from objects belonging to class Design.
(iii) Write the names of all the data members which are accessible from member functions of class costing.
(iv) How many bytes will be required by an object belonging to class Design?
25.
Trine Tech Corporation (TTC) is a professional consultancy company. the company is planning to set up their offices in India with its hub at Hyderabad. As a network advisor, you have to understand their requirement and suggest them the best available solutions. Their queries are mentioned as (i) to (iv) below.
Block to block distance(in m)
| Block (From) | Block(To) | Distance |
|---|---|---|
| Human Resource | Conference | 110 |
| Human Resource | Finance | 40 |
| Conference | Finance | 80 |
Expected number of computers to be in each block
| Block | Computers |
| Human Resource | 25 |
| Finance | 120 |
| Conference | 90 |
(i) Which will be the most appropriate block, where TTC should plan to install their server?
(ii) Draw a block to block cable layout to connect all the building in the most appropriate manner for efficient communication.
(iii) What will be the best possible connectivity out of the following, you will suggest to connect the new setup of offices in Bangalore with its London based office.
(iv) Which of the following device will be suggested by you to connect each computer in each of the buildings?
26.
Assuming the class GAMES as declard below, write a function in C++ to read the objects of GAMES from binary file GAMES.DAT and
display those details of those GAMES, which are meant for children of Age Range"8 to 13"
class GAMES
{
int Gamecode;
char GameName[10];
char *AgeRange;
public:
void Enter()
{
cin>>GameCode;
gets(GameName);
gets(AgeRange);
}
void Display()
{
cout<
char *AgeR() {return AgeRange;}
};
27.
Write a function COUT_TO() in C++ to cout the presence of aworld 'to' in text file NOTES.TXT is as it is very important to know that smoking is injurious to health,let us take initiative to stop it.The function COUT_TO()will display the following message cout of-to=in file:3
28.
Write a program to print the following output after inputting the value of n. The user should be prompted again for the value of n, if the inputted value does not lie between 1 to 6 do the inclusive.
1
1 2 3
1 2 3 4 5
1 2 3 4 5 6 7
- - - - - - -
1 2 - - - - - - (2n-1)
29.
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');
30.
A file named as “EMPLOYEE.DAT” contains the employee records, i.e. objects of class employee.Assuming that the file is just opened through the object FILE of fstream class, in the required file mode, write the command to position the put pointer to point to fifth record from the last record.
31.
How many input combinations can be there in the truth table of a logic system having(N) input binary variables?
32.
State the distributive laws of boolean algebra. How do they differ from the distributive laws of ordinary algebra?
33.
Give the dual of the boolean function \(\bar { X } .(Y+Z)+\bar { X } .(\bar { Y } +\bar { Z } )\)
34.
Write the product of Sum (POS) form of the function G(U,V,W) for the following truth table representation of G:
| U | V | W | G |
| 0 | 0 | 0 | 1 |
| 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 1 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 0 | 1 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 |
35.
Write the Sum of Product(SOP) form of the function F(P,Q, R) for the following truth table representation of F:
| P | Q | R | F |
| 0 | 0 | 0 | 1 |
| 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 |
36.
Give the full form of the following terms:
(i) XML
(ii) FLOSS
(iii) HTTP
(iv) FTP
37.
Write two advantages of using proprietary software over open source software.
38.
What is modem?
39.
What is a protocol? Which is used to search information from internet using an internet.
40.
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'.
41.
Write a query on the SALESPEOPLE table, whose output will exclude all salespeople with a rating >=100, unless they are located in Delhi.
42.
Give the SQL statement to create a table STUDENT with Roll Number, Name, Age and Marks.
43.
Differentiate between SQL commands DROP TABLE and DROP VIEW.
44.
What are DDL and DML?
45.
Write one advantage of star topology of network? Also, illustrate how five computers can be connected with each other using star topology of ntework
46.
Suppose a data structure is stored in a circular queue with N memory locations what will be the queue full condition?
47.
An array circular queue[10] of integers exixt,where currently
Rear=0, Front=1
Answer the following questions based on the above given data:
(i) How many values arte there in queue?
(ii) If five valuesare deleted,whatwould be the new value of Front?
48.
Write the names of the header files to which the following belong: i) puts() ii) sin()
49.
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;
}
50.
Name the features by which classes acquier the properties of other classes.
51.
How an object differs from a program module?
52.
Which function is called during each function call in the program given below?
int sum(int); //Function[I]
float sum(float); //Function[II]
double sum(double); //Function[III}
void main()
{
int x=20;
int a=sum(x); //call1
float b=sum(x); //call2
double c=sum(x); //call3
getch();
}
53.
Is this possible to declare two functions with same name and same argument but different return type in C++?
54.
Which value of x will be printed in following case and why?
int x=9;
void main()
{
int x = 10;
cout<<x;
}
55.
Do you see any similarity between a typedef name and a reference name? If yes, what is it?
56.
What is wrong with the following C++ statement?
long float y;
57.
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.
58.
Consider the following tables.Write SQL commands for the statements (a) to (d) and give outputs for SQL queries (e) to (h)
TABLE: SENDER
| SENDER ID | Sender Name | Sender Address | SenderCity |
| ND01 | R Jain | 2, ABC Appts | New Delhi |
| MU02 | H sinha | 12,Newtown | Mumbai |
| MU15 | SJha | 27/A,Park Street | Mumbai |
| ND50 | T Prasad | 122-k,SDA | New Delhi |
TABLE:RECEIPIENT
| RecID | SenderID | RecName | RecAddress | RecCity |
| KO05 | ND01 | R Baipayee | 5,Central Avenue | Kolkata |
| ND08 | MU02 | S Mahajan | 116, A Vihar | New Delhi |
| MU19 | ND01 | HSingh | 2A,Andheri East | Mumbai |
| MU32 | MU15 | P k Swamy | B5, C S Terminus | Mumbai |
| ND48 | ND50 | S Tripathi | 13,B1 D,Mayur Vihar | New Delhi |
(a) To display the names of all Sender from Mumbai.
(b) To display the RecID, Sender Name, Sender Address, Rec Name, Rec Address for every Recipient.
(c) To display Recipient details in ascending order of RecName.
(d) To display number of Recipients from each city.
(e) SELECT DISTINCT SenderCity FROM SENDER;
(f) SELECT A.SenderName, B.Recname FROM SENDER A, RECIPIENT B
WHERE A.Sender ID=B.SenderID AND B>RecCity='Mumbai';
(g) SELECT Recname, RecAddress FROM RECIPIENT
WHERE RecCity NOT IN('Mumbai','Kolkata');
(h) SELECT RecID, RecNam FROM RECIPIENT
WHERE SenderID='MU02' OR SenderID='ND50';
59.
Consider the following tables CARDEN and CUSTOMER and answer(a) and (b) parts of this questions:
TABLE: CARDEN
| Ccode | Car Name | Make | Color | Capacity | Charge |
| 501 | A-star | Suzuki | RED | 3 | 14 |
| 503 | Indigo | Tata | SILVER | 3 | 12 |
| 502 | Innova | Toyota | WHITE | 7 | 15 |
| 509 | SX4 | Suzuki | SILVER | 4 | 14 |
| 510 | C-Class | Mercedes | RED | 4 | 35 |
TABLE: CUSTOMER
| CCode | CName | CCode |
| 1001 | Hamant Sahu | 501 |
| 1002 | Raj Lal | 509 |
| 1003 | Feroza Shah | 503 |
| 1004 | Ketan Dhal | 502 |
(a) Write SQL commands for the following statements:
(i) To display the name of all the SILVER colored cars.
(ii) To display name of CAR,MAKE and sitting Capacity of cars in descending order of their sitting Capacity.
(iii) To display the higher Charges at which a vehicle can be hired from CARDEN.
(iv) Todisplay the customer name and the corresponding name of the cars hired by them.
(b) Give the output of the following SQL queries:
(i) SELECT COUNT(DISTINCT Make) FROM CARDEN;
(ii) SELECT MAX(Carges),MIN (Charges) FROM CARDEN;
(iii) SELECT COUNT(*) Make FROM CARDEN;
(iv) SELECT CarName FROM CARDEN WHERE Capacity=4;
60.
Consider the following tables CUSTOMER and ONLINESHOP.Write SQL commands for the statements (a) to (d) and give outputs for SQL queries(e) to (h).
TABLE: CUSTOMER
| CID | CNAME | GENDER | SID | AREA |
| 1001 | R SHARMA | FEMALE | 101 | NORTH |
| 1002 | M R TIWARY | MALE | 102 | SOUTH |
| 1003 | M K KHAN | MALE | 103 | EAST |
| 1004 | A K SINGH | MALE | 102 | EAST |
| 1005 | S SEN | FEMALE | 101 | WEST |
| 1006 | R DUBEY | MALE | 104 | NORTH |
| 1007 | M AGARWAL | FEMALE | 104 | NORTH |
| 1008 | S DAS | FEMALE | 103 | SOUTH |
| 1009 | R K PATIL | MALE | 102 | NORTH |
| 1010 | N KRISHNA MURTY | MALE | 102 | SOUTH |
TABLE: ONLINESHOP
| SID | SHOP |
| 101 | MY BUY |
| 102 | ECO BUY |
| 103 | JUST SHOPPING |
| 104 | SHOPPING EASY |
(a) To display CNAME, AREA of all female customers from CUSTOMER table.
(b) To display the details of all the CUSTOMERS in ascending order of CNAME within SID.
(c) To display the total number of customers for each AREA from CUSTOMER table.
(d) to display CNAME and corres[ponding SHOP from CUSTOMER table and ONLINESHOP table.
(e) SELECT COUNT(*), GENDER FROM CUSTOMER GROUP BY GENDER;
(f) SELECT COUNT(*) FROM ONLINESHOP;
(g) SELECT CNAME FROM CUSTOMER WHERE CNAME LIKE 'L%';
(h) SELECT DISTINCT AREA FROM CUSTOMER;
61.
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.
void thewordCount( )
{
ifstream Fil(“STORY.TXT”);
char String[20];
int C=0;
while(Fil)
{
Fil>>String;
if(strcmpi(String,”the”)==0)//case insensitive
C=C+1;
}
cout<< X << endl;
Fil.close();
}
OR
void thewordCount( )
{
ifstream Fil(“STORY.TXT”);
char String[20];
int C=0;
while(Fill)
{ Fil>>String;
if(strcmp(String,”the”)==0 || strcmp(String,”The”)==0)
C=C+1;
}
cout<< C << endl;
Fil.close( );
}
OR
void thewordCount( )
{
ifstream F(“STORY.TXT”);
char Str[4];
int C=0;
while(F.getline(Str,4,’ ‘))
{
if(strcmp(Str,”the”)==0 || strcmp(Str,”The”)==0) C=C+1;
}
cout<< C<< endl;
F.close( );
}
2.
The associative law states:
(i) X+(Y+Z)=(X+Y)+Z
(ii) X.(Y.Z)=(X.Y).Z
Verification:
(i) Truth table of X+(Y+Z)=(X+Y)+Z
| X | Y | Z | Y+Z | X+Y | X+(Y+Z) | (X+Y)+Z |
| 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 | 1 | 1 |
| 0 | 1 | 0 | 1 | 1 | 1 | 1 |
| 0 | 1 | 1 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 1 | 1 | 1 |
| 1 | 0 | 1 | 1 | 1 | 1 | 1 |
| 1 | 1 | 0 | 1 | 1 | 1 | 1 |
| 1 | 1 | 1 | 1 | 1 | 1 | 1 |
Both columns X+(Y+Z) and (X+Y)+Z are identical.
\(\therefore \) X+(Y+Z)=(X+Y)+Z Hence Proved.
(ii) Truth table of X.(Y.Z)=(X.Y).Z
| X | Y | Z | Y.Z | X.(Y.Z) | X.Y | (X.Y).Z |
| 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 | 0 | 0 | 0 |
| 1 | 0 | 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 | 0 | 0 | 0 |
| 1 | 1 | 0 | 0 | 0 | 1 | 0 |
| 1 | 1 | 1 | 1 | 1 | 1 | 1 |
Both columns X.(Y.Z) and (X.Y).Z are identical.
\(\therefore\) X.(Y.Z)=(X.Y).Z Hence proved.
3.
Distributive law state that:
(i)X.(Y+Z)=X.Y+X.Z
(ii) X+Y.Z=(X+Y).(X+Z)
Verification:
(i) Truth table of : X.(Y+Z)=X.Y+X.Z
| X | Y | Z | Y+Z | X.(Y+Z) | X.Y | X.Z | X.Y+X.Z |
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 1 | 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 | 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
Both columns X.(Y+Z) and X.Y+X.Z are identical.
\(\therefore \) X.( Y+Z)=X.Y+X.Z . Hence Proved.
(ii) Truth table for X+Y.Z=(X+Y).(X+Z)
| X | Y | Z | Y.Z | X+Y.Z | X+Y | X+Z | (X+Y).(X+Z) |
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 |
| 1 | 1 | 0 | 0 | 1 | 1 | 1 | 1 |
| 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
Both columns X+Y.Z and (X+Y).(X+Z) are identical.
\(\therefore \) X+Y.Z=(X+Y).(X+Z) . Hence Proved.
4.
(i) DHTML DHTML stands for Dynamic HyperText Markup Language. It refers to the web content that changes according to the user request. It will react the user input without sending requests to the web server.
(ii) ISP ISP stands for Internet Service Provider. It refers to the company that provides Internet Services. Some common examples of ISPs are Airtel, BSNL, Tata docomo, etc.
5.
void print(char a[],char b[])
{
for(int i=0;i
if(a[i]>b[i]
{
for(int j=1;j<=i+1;j++)
cout< cout<
else
{
for(j=0;j cout< cout<
}
}
6.
ii) CHN:KOL:CHN:
iv) KOL:CHN:KOL:
7.
#include
void Cnver(int T[], int Num)
{
int temp = t[0];
for(int i=0;i<(Num-1);i++)
{
T[i]=T[i+1];
}
8.
iv) 29:26:25:26: because in
1st pass Number = 25+random(5),i.e.25+0 to4 =25 to 29
2nd pass Number = 25+random(4)i.e. 25 to 28
3rd pass Number = 25+random(3)i.e. 25 to 27
4th pass Number = 25+random(2)i.e. 25 to 26
9.
#include
#include
class OFFER
{
int offerId;
char Description[80];
void show()
{
cout<<offerId<<":"<
public:
void Enter()
{
cin>>offerId; gets(Description);
}
};
void main()
{
OFFER obj;
obj.Enter();
//obj.show();
//show cannot be called because in
//class declared as private
}
10.
2
11.
With the multiple definitions of single function name, the function
signature makes them significantly different.The function signature can be recognized by the list of argument.Either number of argument may differ or types of argument may differ in function declaration.Another difference is that the sequence of argument type may differ.So in short, we can say that function's signature makes them significantly different in making function with same name with multiple definitions
12.
Degree: The number of attribute (or) columns in a table is called the degree of the table.
The degree of the given table is:3
Cardinality: The number of rows (or) records in a table is called the cardinality of the table.
The cardinality of the given table is:2.
13.
14.
15.
16.
F(U,V,W,Z)= (0,1,2,4,5,6,8,10)
=\(\Sigma\)(3,7,9,11,12,13,14,15)
17.
The stack operation is:
| Scanned Elements | Operation | Stack Status |
| ( | ( | |
| ( | (( | |
| ( | ((( | |
| A | ((( | A |
| + | (((+ | A |
| B | (((+ | AB |
| ) | (( | AB+ |
| - | ((- | AB+ |
| C | ((- | AB+C |
| ) | ( | AB+C- |
| * | (* | AB+C- |
| ( | (*( | AB+C- |
| D | (*( | AB+C-D |
| - | (*(- | AB+C-D |
| E | (*(- | AB+C-DE |
| ) | (* | AB+C-DE- |
| ) | empty | AB+C-DE-* |
Hece,the postfix notation is AB+C-DE-*
18.
a Orooile
19.
#include<iostream.h>
#include<conio.h>
struct students_record
{
int s_rollno, s_class;
};
void display(int, int);
void main()
{
students_record s1={24,11};
display(s1.s_rollno,s1.s_class);
getch();
}
void display(int rollno, int Class)
{
cout<<"\nRoll no: "<<rollno;
cout<<"\nClass: "<<Class;
}
Output
Roll no:24
Class:11
20.
#include<iostream.h>
const int Multiple =3; //Correction 1
void main()
{
int value = 15; //Correction 2
for( int Counter=1; Counter<=5; Counter++, value-=2) //Correction 3
if(value%Multiple==0)
{
cout<<Value*Multiple;
cout<<endl;
} //correction 4 else
cout<<Value+Multiple<<endl;
}
Correction 1 Multiple must be assigned a value.
Correction 2 Variable value must be declared with datatype.
Correction 3 =< Must be replace with <=.
Correction 4 Misplace else; so after if, compound statement must be enclosed with { }.
21.
22.
23.
24.
(i) None of the data members
(ii) void Enterdesign( ), void dispdesign( )
(iii) price, cost_of_cloth, design_code, designfee, stiching, costprice, sellprice;
(iv) 61 bytes
25.
(i) TTC should install its server in finance block as it is having a maximum number of computers.
(ii) The above layout is based on maximum cable length required, which is 120 meters in the above case.
(iii) Satellite Link
(iv) Switch.
26.
void READGAMES()
{
GAMES obj;
ifstream infile(:GAMES.DAT:);
while(infile.read((char*)&obj,sizeof(obj)))
{
if(strcmp(obj.Agr(),"8 to 13")==0)
obj.Display();
}
infile.close();
}
27.
void COUNT_TO()
{
ifstream fin("NOTES.TXT");
Char str[10];
int C=0;
while(!fin.eof())
{
fin>>str;str[0]=tolower(str[0]);
if(strcmp(str,"0")==0)
C++;
}
fin.close();
cout<<"Cout of-to-in file:"<
}
28.
#include<iostream.h>
#include<conio.h>
void main()
{
int a;
do
{
cout<<"Enter a";
cin>>a;
}
while((a<1)||(a<6));
for(int i=0;i<=a;i++)
{
for(int k=1;k<=(a-i);k++)
cout<<" "<<" ";
for(int j=1;j<=(2*i-1);j++)
cout<<j<<" "<<" ";
cout<<"\n";
}
getch();
}
29.
(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.
30.
( )
File.seekp(-5,ios::end);
31.
( )
2N input combinations can be there in the truth table of a logic system.
32.
( )
Distributive laws of boolean algebra state that:
(i) X.(Y+Z)=X.Y+X.Z
(ii) X+Y.Z=(X+Y).(X+Z)
Law X.(Y+Z)=X.Y+X.Z satisfy ordinary algebra for all values, whereas X+Y.Z=(X+Y).(X+Z) satisfy only for two values (0,1)of X, Y and Z.
33.
( )
Using duality principle, changing (+) to(.) and vice-versa and by keeping the form of variables as such the dual of the expression is: \((\bar { X } +Y.Z).(\bar { X } +\bar { Y } .\bar { Z } )\)
34.
( )
| U | V | W | G | Maxterms |
| 0 | 0 | 0 | 1 | U+V+W |
| 0 | 0 | 1 | 0 | \(U+V+\bar { W } \) |
| 0 | 1 | 0 | 1 | \(U+\bar {V}+ W \) |
| 0 | 1 | 1 | 1 | \(U+\bar {V}+\bar { W } \) |
| 1 | 0 | 0 | 1 | \(\bar {U}+V+W \) |
| 1 | 0 | 1 | 0 | \(\bar{U}+V+\bar { W } \) |
| 1 | 1 | 0 | 0 | \(\bar {U}+\bar {V}+W \) |
| 1 | 1 | 1 | 1 | \(\bar {U}+\bar {V}+\bar { W } \) |
POS form of function G(U,V,W) is : \((U+V+\bar { W } ).(U+\bar { V } +\bar { W } ).(\bar { U } +V+\bar { W } ).(\bar { U } +\bar { V } +W)\)
35.
( )
| P | Q | R | F | Minterms |
| 0 | 0 | 0 | 1 | \(\bar { P } .\bar { Q } .\bar { R } \) |
| 0 | 0 | 1 | 0 | \(\bar { P } .\bar { Q } .R \) |
| 0 | 1 | 0 | 0 | \(\bar { P } .Q .\bar { R } \) |
| 0 | 1 | 1 | 1 | \(\bar { P } . Q .R \) |
| 1 | 0 | 0 | 0 | \(P .\bar { Q } .\bar { R } \) |
| 1 | 0 | 1 | 0 | \(P .\bar { Q } .R \) |
| 1 | 1 | 0 | 1 | \(P.Q .\bar { R } \) |
| 1 | 1 | 1 | 1 | P.Q.R |
SOP form of function F(P, Q, R) is: \(=\bar { P } .\bar { Q } .\bar { R } +\bar { P } .Q.R+P.Q.\bar { R } +P.Q.R\)
36.
( )
(i) XML eXtensible Markup Language'
(ii) FLOSS Free Libre and Open Source Software
(iii) HTTP HyperText Transfer Protocol
(iv) FTP File transfer Protocol.
37.
( )
The software is safe and guaranteed to be safe from dubious threats like programming bugs and viruses, thus providing ease of mind for the user. The software is easier to install and used as the production is planned and extensive research is carried out to ensure uers purchase only the best.
38.
( )
A modem is a data communication equipment that facilitates data communication through telephone lines. It is used to convert digital data into analog and vice-versa.
39.
( )
Protocol is a set of rules that two or more computers must follow to communicate on network.
WWW (World Wide Web) is used for searching information from Internet browser.
40.
( )
i)Select P_Name MAX(SAL) FROM PROGRAMMERS;
ii)UPDATE PROGRAMMERS SET SAL=SAL+2000 WHERE P_NAME LIKE "R%';
41.
( )
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');
42.
( )
CREATE TABLE STUDENT( ROLL Number NUMBER(5) Primary key, Name CHAR(20), Age NUMBER(2), MARKS NUMBER(4));
43.
( )
DROP TABLE command deletes the definition of the table as well as the data of table.If the table is dropped you cannot access it.While DROP VIEW command only deletes the definition of view.Dropping a view does not affect the base table.i.e. no loss of data is there in DROP VIEW.
Syntax of DROP View is - DROP VIEW viewname;
44.
( )
DDL (Data Definition Language) It is a part of SQL, which provides commands for creation,altering and deleting the tables.Different DDL commands are CREATE, ALTER and DROP.
DML (Data Manipulation language) It is a part of SQL, which provides commands for inserting, deleting and updating the information in a database.Different DML commands are SELECT,UPDATE,DELETE,INSERT.
45.
( )
Advantage of star topology No distribution to the network when connecting or removing devices.
Five computers can be connected with each other using server in the following way:
46.
( )
Circular queue will be full if ((front==Rear + 1) (Fornt == 0 && Rear ==N-1))
47.
( )
(i) 10
(ii) Front = 6
48.
( )
i) puts() belongs to #include<stdio.h>
ii) sin() belongs to #include<math.h>
49.
( )
iostream.h ---> cout,cin
ctype.h -----> tolower()
50.
( )
Inheritance is the feature by which classes acquire the properties of other classes.
51.
( )
An object is areal world entity that consists of both data and function and this integrated unit
provides the necessary behaviour expected from the object.While a program module is a piece of code,which performs a particular function or set of functions.
52.
( )
Call 1,2 and 3 will invoke only function [I] because controls with match only function [I] at each
time.It is being called.And each time return value will ba an integer that can be assigned to a
higher data type easily.
53.
( )
No,it is not possible to declare two functions with same name and same argument but different
return type in C++,because the control will be confused at the time of calling which of these function will be executed first.
54.
( )
Value of x will be 10 because local variable hides global variable.
55.
( )
Yes, there is a similarity between a typedef name and a reference name. A typedef name is an alias name of an already defined data type and a reference name is an alias name of an already defined variable.
56.
( )
There is no data type as long float in C++. The double data type denotes the same, thus the statement should be
double y;
57.
(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;
58.
(a) SELECT SenderName FROM SENDER WHERE SenderCity='Mumbai';
(b) SELECT RecID, SenderName, SenderAddress,RecName,RecAddress
FROM RECIPIENT, SENDER WHERE RECIPIENT.SenderID=SENDER.SenderID;
(C) SELECT*FROM RECIPIENT ORDER BY RecName;
(d) SELECT COUNT(*) As "No of Recipients",RecCity FROM RECIPIENT GROUP BY RecCity;
(e)
| Distinct SenderCity |
| New Delhi |
| Mumbai |
(f)
| Sendername | Recname |
| R jain | H Singh |
| S Jha | P K Swamy |
(g)
| RecName | RecAddress |
| S Mahajan | 116,A Vihar |
| S Tripathi | 13,B1D, Mayur Vihar |
(h)
| RecID | Recname |
| ND08 | S Mahajan |
| ND48 | S Tripathi |
59.
(a) (i) SELECT CarnAME FROM CARDEN WHERE Color='SILVER';;
(ii) SELECT CarName,Make, Capacity FROM CARDEN ORDER BY Capacity DESC;
(iii) SELECT MAX(Charges) FROM CARDEN;
(iv) SELECT CUSTOMER.CNAME, CARDEN.CARNAME FROM CARDEN, CUSTOMER WHERE CARDEN.Ccode=CUSTOMER.Ccode;
(b)(i)
| COUNT (DISTINCT MAKE) |
| 4 |
(ii)
| MAX(Charges) | MIN(Charges) |
| 35 | 12 |
(iii)
| MAKE(*) |
| 5 |
(iv)
| CARNAME |
| SX4 |
| C-CLASS |
60.
(a)SELECT CNAME,AREA FROM CUSTOMER
WHERE GENDER ='FEMALE';
(b) SELECT * FROM CUSTOMER ORDER BY SID, CNAME;
(c) SELECT AREA COUNT(*) FROM CUSTOMER GROUP BY AREA;
(d) SELECT CUSTOMER .CNAME, ONLINESHOP.SHOP
FROM CUSTOMER, ONLINESHOP WHERE CUSTOMER.SID=ONLINESHOP.SID;
(e)
| COUNT(*) | GENDER |
| 4 | FEMALE |
| 6 | MALE |
(f)
| COUNT(*) |
| 4 |
(g) No rows selected.
(h)
| DISTINCT AREA |
| NORTH |
| SOUTH |
| EAST |
| WEST |
61.
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