SlideShare a Scribd company logo
1 of 11
Sample Paper
Class – XII
Subject – Computer Science
Time Allowed: 3hours Maximum Marks: 70
Note. (i) All questions are compulsory. (ii) Programming Language: C+ +
Ques 1.
(a) Differentiate between a global variable and a local variable. Also give suitable example in C++. 2
(b) Name the Header file(s), to which the following built-in functions belongs to: 1
(i)isdigit ( ) ( ii) gotoxy ( )
(c) Rewrite the following program after removing syntactical error(s) if any. Underline each correction. 2
#include<iostream.h>
void main( )
{
struct movie
{ char movie_name[20];
char movie_type;
int tickets=100;
} MOVIE;
gets(movie_name);
gets(movie_type);
}
(d) Find the output of the following program (Assuming that all required header files are included) 3
void main( )
{
char * NAME = “admiNStrAtiOn”;
for( int x=0;x<strlen(NAME);x++)
if(islower(NAME[x])
NAME[x] = toupper(NAME[x]);
else
if(isupper (NAME[x]))
if(x%2==0)
NAME[x] = NAME[x -1];
else
NAME[x]--;
cout<<NAME <<endl;
}
(e) Find the output of the following program 2
#include<iostream.h>
void Modify(int &a, int b=10)
{ if(b%10==0)
a+=5;
for(int i=5;i<=a;i++)
cout<<b++<<.:.;
cout<<endl;
}
void Disp(int x)
{
if(x%3==0)
Modify(x);
else
Modify(x,3);
}
void main()
{ Disp(3);
Disp(4);
Modify(2,20);
}
(f) Observe the following program Game.cpp carefully, if the value of Num entered by user is 14, choose the
correct possible output(s) from the option i) to iv) and justify your option. 2
Output options:
i) 1 2 3 4
ii) 1 2 3 4 5 6 7 8 9 10 11
iii) 1 2 3 4 5
iv) None of the above
Ques 2.
(a) Differentiate between a default and a parameterized constructor in context of class and object. Give suitable
example in C++. 2
(b) Answer the questions (i) and (ii) after going through the following class 2
class Computer
{
char C_name[20];
char Config[100];
public:
Computer(Computer &obj); // function1
~Computer(); //function 2
};
(i) Write the statement(s) which will invoke the function 1.
(ii) Name the specific feature of the class shown by function 2. Also write the time of its invoke.
(c) Define a class Travel in C++ with the description given below: 4
Private members:
plancode of type long
place of type characters array
number_of_travellers of type integer
number_of_buses of type integer
Public members:
A constructor to assign initial values of plancode as 1001, place as “Kolkata”, number_of_travellers as 5 and
number_of_buses as 1
A function newplan( ) which allows user to enter plancode , place and number_of_travellers and also assign the
number_of_buses as per the following conditions:
number_of_travellers number_of_buses
less than 20 2
equal to and more than 20 and less than 40 3
equal to and more than 40 4
A function show( ) to display the contents of all the data members on the screen.
(d) Answer the questions (i) to (iv) based on the following code : 4
class Goods
{ int id;
protected :
char name[20];
long qty;
void Incr(int n);
public :
Goods();
~Goods();
void get(); };
class Food_products : public Goods
{ char exp_dt[10];
protected :
int id;
int qty;
public :
void getd();
void showd(); };
class Cosmetics : private Goods
{ int qty;
char exp_date[10];
protected :
int id;
public :
~Cosmetics();
Cosmetics();
void show();
};
(i) How many bytes will be required by an object of class Food_products.
(ii) Name the member functions accessible through the object of class Food_products.
(iii) From the following, Identify the member function(s) that cannot be called directly from the object of class
Cosmetics
show(), getd(), get()
(iv) If the class cosmetics inherits the properties of food_products class also, then name the type of inheritance.
Ques 3.
(a) Write a function in C++ which accepts an integer array and its size as arguments and change all the even
number with twice and odd with thrice. 3
Example: if an array of five elements initially contains the element as
2,4,1,5,7
then the function should rearrange the array as
4,8,3,15,21
(b) An array A[40][10] is stored in the memory along the column with each element occupying 4 bytes. Find out
the Base address and address of the element A[3][6] if the element A[30][10] is stored at the address 9000. 3
(c) Write a function in C++ to delete a node containing names of student, from a dynamically allocated stack of
names implemented with the help of following structure : 3
struct student
{
char name[20];
student *next;
};
(d)W rite a function in C++ which accepts an integer array and its size as arguments/parameters and assign the
elements into a two dimensional array of integer in the following format: 3
if the array is 1,2,3,4,5,6 if the array is 1,2,3
the resultant 2D array is given below the resultant 2D array is given below
1 2 3 4 5 6 1 2 3
1 2 3 4 5 0 1 2 0
1 2 3 4 0 0 1 0 0
1 2 3 0 0 0
1 2 0 0 0 0
1 0 0 0 0 0
(e) Evaluate the following postfix expression using a stack and show the contents of stack after execution of each
operation : 25 8 3 - / 6 * 10 + 2
Ques 4.
(a) Observe the program segment given below carefully and fill the blanks marked statement 1 and statement 2
using seekg( ) and tellg( ) function for performing the required task. 1
#include<fstream.h>
class Employee
{int Eno;
char Ename[30];
public:
int Countrec( ); //Function to count the total number of records
};
int Employee:: Countrec( )
{
fstream File;
File.open(“Emp.Dat”,ios::binary||ios::in);
___________ // Statement 1
int Bytes = ________________ // Statement 2
int count = Bytes/sizeof(Employee);
File.close( );
return count;
}
(b) Write a function in C++ to count and display the number of line starting with alphabet ‘A’ present in a
text file “LINES.TXT”. 3
Example: if the file LINES.TXT contains the following lines:
A boy is playing there.
There is a playground.
An aeroplane is in the sky.
Alphabets and numbers are allowed in the password.
Then the function should display the output as 3.
(c) Assuming the class Computer as follows: 2
Class computer
{
char chiptype[10];
int speed;
public:
void getdetails( )
{
gets(chiptype);
cin>>speed;
}
void showdetails( )
{
cout<<”Chip”<<chiptype<<”Speed=”<<speed<<endl;
}
};
Write a function readfile() to read all the records present in an already existing binary file “SHIP. DAT” and
display them on the screen, also count the number of records present in the file.
Ques.5
(a) What is relation? What is the difference between a tuple and an attribute? 2
(b) Write the SQL commands for the i) to iv) and write the output of the v) on the basis of table teacher 6
6
i) To show all information about the teacher of History department.
ii) To list the names of female teachers who are in Maths department.
iii) To list names of all teachers with their date of admission in ascending order.
iv)To insert a new row in TEACHER table with the data: 9,’Raja’, 26,’Computer’, {13/05/95}, 23000,’M’
v)Give the output of the following SQL statements.
a. Select COUNT(distinct department) from TEACHER;
b. Select MAX(Age) from TEACHER where SEX=’F’;
c. Select AVG(Salary) from TEACHER where SEX=’M’;
d. Select SUM(Salary) from TEACHER where DATOFJOIN<{12/07/96};
Ques 6
(a) State and verify Dsitributive law in Boolean Algebra. 2
Draw a logical circuit diagram for the following Boolean expression: A.(B+C)’ 2
(b) Convert the following Boolean expression into its equivalent Canonical Sum of Products Form
(U’+V’+W’). (U+V’+W’). (U+V+W) 1
(c) Reduce the following Boolean expression using K-map 3
F(A,B,C,D)= Σ(1,3,4,5,7,9,11,12,13,14)
Ques:7
(a) Differentiate between Internet and Intranet. 2
(b) Expand the following ii) CDMA (ii) URL 1
(c) Knowledge Supplement Organization has set up its new centre at Manglore for its office and web based
activities. It has four buildings as shown in the diagram below: 4
Center to center distance between various buildings Number of Computers
Alpha to Beta 50m Alpha 25
Beta to Gamma 150m Beta 50
Gamma to Lambda 25m Gamma 125
Alpha to Lambda 170m Lambda 10
Beta to Lambda 125m
Alpha to Gamma 90m
i) Suggest a cable layout of connections between the buildings
ii) Suggest the most suitable place(i.e building) to house the server of this organization with a
suitable reason iii)Suggest the placement of the following devices with justification: Repeater Hub/Switch
No. Name Age Department Dateofadm Salary Sex
1 Jugal 34 Computer 10/01/97 12000 M
2 Sharmila 31 History 24/03/98 20000 F
3 Sandeep 32 Maths 12/12/96 30000 M
4 Sangeeta 35 History 01/07/99 40000 F
5 Rakesh 42 Maths 05/09/97 25000 M
6 Shyam 50 History 37/06/98 30000 M
7 Shivam 44 Computer 25/02/97 21000 M
8 Shalakha 33 Maths 31/07/97 20000 F
Al
ph
a
G
a
m
m
aB
et
a
La
mbd
a
iv) The organization is planning to link its front office situated in the city in a hilly region where cable connection
is not feasible, suggest an economic way to connect it with reasonably high speed?
(d) What do you mean by Free Software and OSI? 2
(e) Name any two cyber crimes. 1
Sample Paper
Class – XII
Subject – Computer Science
Time Allowed: 3hours Maximum Marks: 70
Note. (i) All questions are compulsory. (ii) Programming Language: C+ +
Ques 1.
(a) Differentiate between a global variable and a local variable. Also give suitable example in C++. 2
(b) Name the Header file(s), to which the following built-in functions belongs to: 1
(i)isdigit ( ) ( ii) gotoxy ( )
(c) Rewrite the following program after removing syntactical error(s) if any. Underline each correction. 2
#include<iostream.h>
void main( )
{
struct movie
{ char movie_name[20];
char movie_type;
int tickets=100;
} MOVIE;
gets(movie_name);
gets(movie_type);
}
(d) Find the output of the following program (Assuming that all required header files are included) 3
void main( )
{
char * NAME = “admiNStrAtiOn”;
for( int x=0;x<strlen(NAME);x++)
if(islower(NAME[x])
NAME[x] = toupper(NAME[x]);
else
if(isupper (NAME[x]))
if(x%2==0)
NAME[x] = NAME[x -1];
else
NAME[x]--;
cout<<NAME <<endl;
}
(e) Find the output of the following program 2
#include<iostream.h>
void Modify(int &a, int b=10)
{ if(b%10==0)
a+=5;
for(int i=5;i<=a;i++)
cout<<b++<<.:.;
cout<<endl;
}
void Disp(int x)
{
if(x%3==0)
Modify(x);
else
Modify(x,3);
}
void main()
{ Disp(3);
Disp(4);
Modify(2,20);
}
(f) Observe the following program Game.cpp carefully, if the value of Num entered by user is 14, choose the
correct possible output(s) from the option i) to iv) and justify your option. 2
Output options:
v) 1 2 3 4
vi) 1 2 3 4 5 6 7 8 9 10 11
vii) 1 2 3 4 5
viii) None of the above
Ques 2.
(a) Differentiate between a default and a parameterized constructor in context of class and object. Give suitable
example in C++. 2
(b) Answer the questions (i) and (ii) after going through the following class 2
class Computer
{
char C_name[20];
char Config[100];
public:
Computer(Computer &obj); // function1
~Computer(); //function 2
};
(i) Write the statement(s) which will invoke the function 1.
(ii) Name the specific feature of the class shown by function 2. Also write the time of its invoke.
(c) Define a class Travel in C++ with the description given below: 4
Private members:
plancode of type long
place of type characters array
number_of_travellers of type integer
number_of_buses of type integer
Public members:
A constructor to assign initial values of plancode as 1001, place as “Kolkata”, number_of_travellers as 5 and
number_of_buses as 1
A function newplan( ) which allows user to enter plancode , place and number_of_travellers and also assign the
number_of_buses as per the following conditions:
number_of_travellers number_of_buses
less than 20 2
equal to and more than 20 and less than 40 3
equal to and more than 40 4
A function show( ) to display the contents of all the data members on the screen.
(d) Answer the questions (i) to (iv) based on the following code : 4
class Goods
{ int id;
protected :
char name[20];
long qty;
void Incr(int n);
public :
Goods();
~Goods();
void get(); };
class Food_products : public Goods
{ char exp_dt[10];
protected :
int id;
int qty;
public :
void getd();
void showd(); };
class Cosmetics : private Goods
{ int qty;
char exp_date[10];
protected :
int id;
public :
~Cosmetics();
Cosmetics();
void show();
};
(i) How many bytes will be required by an object of class Food_products.
(ii) Name the member functions accessible through the object of class Food_products.
(iii) From the following, Identify the member function(s) that cannot be called directly from the object of class
Cosmetics
show(), getd(), get()
(iv) If the class cosmetics inherits the properties of food_products class also, then name the type of inheritance.
Ques 3.
(a) Write a function in C++ which accepts an integer array and its size as arguments and change all the even
number with twice and odd with thrice. 3
Example: if an array of five elements initially contains the element as
2,4,1,5,7
then the function should rearrange the array as
4,8,3,15,21
(b) An array A[40][10] is stored in the memory along the column with each element occupying 4 bytes. Find out
the Base address and address of the element A[3][6] if the element A[30][10] is stored at the address 9000. 3
(c) Write a function in C++ to delete a node containing names of student, from a dynamically allocated stack of
names implemented with the help of following structure : 3
struct student
{
char name[20];
student *next;
};
(d)W rite a function in C++ which accepts an integer array and its size as arguments/parameters and assign the
elements into a two dimensional array of integer in the following format: 3
if the array is 1,2,3,4,5,6 if the array is 1,2,3
the resultant 2D array is given below the resultant 2D array is given below
1 2 3 4 5 6 1 2 3
1 2 3 4 5 0 1 2 0
1 2 3 4 0 0 1 0 0
1 2 3 0 0 0
1 2 0 0 0 0
1 0 0 0 0 0
(e) Evaluate the following postfix expression using a stack and show the contents of stack after execution of each
operation : 25 8 3 - / 6 * 10 + 2
Ques 4.
(d) Observe the program segment given below carefully and fill the blanks marked statement 1 and statement 2
using seekg( ) and tellg( ) function for performing the required task. 1
#include<fstream.h>
class Employee
{int Eno;
char Ename[30];
public:
int Countrec( ); //Function to count the total number of records
};
int Employee:: Countrec( )
{
fstream File;
File.open(“Emp.Dat”,ios::binary||ios::in);
___________ // Statement 1
int Bytes = ________________ // Statement 2
int count = Bytes/sizeof(Employee);
File.close( );
return count;
}
(e) Write a function in C++ to count and display the number of line starting with alphabet ‘A’ present in a
text file “LINES.TXT”. 3
Example: if the file LINES.TXT contains the following lines:
A boy is playing there.
There is a playground.
An aeroplane is in the sky.
Alphabets and numbers are allowed in the password.
Then the function should display the output as 3.
(f) Assuming the class Computer as follows: 2
Class computer
{
char chiptype[10];
int speed;
public:
void getdetails( )
{
gets(chiptype);
cin>>speed;
}
void showdetails( )
{
cout<<”Chip”<<chiptype<<”Speed=”<<speed<<endl;
}
};
Write a function readfile() to read all the records present in an already existing binary file “SHIP. DAT” and
display them on the screen, also count the number of records present in the file.
Ques.5
(c) What is relation? What is the difference between a tuple and an attribute? 2
(d) Write the SQL commands for the i) to iv) and write the output of the v) on the basis of table teacher 6
6
iv) To show all information about the teacher of History department.
v) To list the names of female teachers who are in Maths department.
vi) To list names of all teachers with their date of admission in ascending order.
iv)To insert a new row in TEACHER table with the data: 9,’Raja’, 26,’Computer’, {13/05/95}, 23000,’M’
v)Give the output of the following SQL statements.
e. Select COUNT(distinct department) from TEACHER;
f. Select MAX(Age) from TEACHER where SEX=’F’;
g. Select AVG(Salary) from TEACHER where SEX=’M’;
h. Select SUM(Salary) from TEACHER where DATOFJOIN<{12/07/96};
Ques 6
(d) State and verify Dsitributive law in Boolean Algebra. 2
Draw a logical circuit diagram for the following Boolean expression: A.(B+C)’ 2
(e) Convert the following Boolean expression into its equivalent Canonical Sum of Products Form
(U’+V’+W’). (U+V’+W’). (U+V+W) 1
(f) Reduce the following Boolean expression using K-map 3
F(A,B,C,D)= Σ(1,3,4,5,7,9,11,12,13,14)
Ques:7
(f) Differentiate between Internet and Intranet. 2
(g) Expand the following ii) CDMA (ii) URL 1
(h) Knowledge Supplement Organization has set up its new centre at Manglore for its office and web based
activities. It has four buildings as shown in the diagram below: 4
Center to center distance between various buildings Number of Computers
Alpha to Beta 50m Alpha 25
Beta to Gamma 150m Beta 50
Gamma to Lambda 25m Gamma 125
Alpha to Lambda 170m Lambda 10
Beta to Lambda 125m
Alpha to Gamma 90m
No. Name Age Department Dateofadm Salary Sex
1 Jugal 34 Computer 10/01/97 12000 M
2 Sharmila 31 History 24/03/98 20000 F
3 Sandeep 32 Maths 12/12/96 30000 M
4 Sangeeta 35 History 01/07/99 40000 F
5 Rakesh 42 Maths 05/09/97 25000 M
6 Shyam 50 History 37/06/98 30000 M
7 Shivam 44 Computer 25/02/97 21000 M
8 Shalakha 33 Maths 31/07/97 20000 F
Al
ph
a
G
a
m
m
aB
et
a
La
mbd
a
i) Suggest a cable layout of connections between the buildings
ii) Suggest the most suitable place(i.e building) to house the server of this organization with a
suitable reason iii)Suggest the placement of the following devices with justification: Repeater Hub/Switch
iv) The organization is planning to link its front office situated in the city in a hilly region where cable connection
is not feasible, suggest an economic way to connect it with reasonably high speed?
(i) What do you mean by Free Software and OSI? 2
(j) Name any two cyber crimes. 1

More Related Content

What's hot

GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...
GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...
GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...chinthala Vijaya Kumar
 
GATE Computer Science Solved Paper 2004
GATE Computer Science Solved Paper 2004GATE Computer Science Solved Paper 2004
GATE Computer Science Solved Paper 2004Rohit Garg
 
Sample Paper 2 Class XI (Computer Science)
Sample Paper 2 Class XI (Computer Science)Sample Paper 2 Class XI (Computer Science)
Sample Paper 2 Class XI (Computer Science)Poonam Chopra
 
Gate Computer Science Solved Paper 2007
Gate Computer Science Solved Paper 2007 Gate Computer Science Solved Paper 2007
Gate Computer Science Solved Paper 2007 Rohit Garg
 
Question Paper Code 065 informatic Practice New CBSE - 2021
Question Paper Code 065 informatic Practice New CBSE - 2021 Question Paper Code 065 informatic Practice New CBSE - 2021
Question Paper Code 065 informatic Practice New CBSE - 2021 FarhanAhmade
 
Informatics Practices (new) solution CBSE 2021, Compartment, improvement ex...
Informatics Practices (new) solution CBSE  2021, Compartment,  improvement ex...Informatics Practices (new) solution CBSE  2021, Compartment,  improvement ex...
Informatics Practices (new) solution CBSE 2021, Compartment, improvement ex...FarhanAhmade
 
FP305 data structure PAPER FINAL SEM 3
FP305 data structure PAPER FINAL SEM 3FP305 data structure PAPER FINAL SEM 3
FP305 data structure PAPER FINAL SEM 3Syahriha Ruslan
 
FP305 data structure june 2012
FP305   data structure june 2012FP305   data structure june 2012
FP305 data structure june 2012Syahriha Ruslan
 
Data structures question paper anna university
Data structures question paper anna universityData structures question paper anna university
Data structures question paper anna universitysangeethajames07
 
C programming session 05
C programming session 05C programming session 05
C programming session 05Vivek Singh
 
Automata And Compiler Design
Automata And Compiler DesignAutomata And Compiler Design
Automata And Compiler Designguestac67362
 
important C questions and_answers praveensomesh
important C questions and_answers praveensomeshimportant C questions and_answers praveensomesh
important C questions and_answers praveensomeshpraveensomesh
 
09 a1ec01 c programming and data structures
09 a1ec01 c programming and data structures09 a1ec01 c programming and data structures
09 a1ec01 c programming and data structuresjntuworld
 

What's hot (20)

GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...
GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...
GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...
 
GATE Computer Science Solved Paper 2004
GATE Computer Science Solved Paper 2004GATE Computer Science Solved Paper 2004
GATE Computer Science Solved Paper 2004
 
Paper
PaperPaper
Paper
 
Sample paper i.p
Sample paper i.pSample paper i.p
Sample paper i.p
 
Sample Paper 2 Class XI (Computer Science)
Sample Paper 2 Class XI (Computer Science)Sample Paper 2 Class XI (Computer Science)
Sample Paper 2 Class XI (Computer Science)
 
Gate Computer Science Solved Paper 2007
Gate Computer Science Solved Paper 2007 Gate Computer Science Solved Paper 2007
Gate Computer Science Solved Paper 2007
 
Question Paper Code 065 informatic Practice New CBSE - 2021
Question Paper Code 065 informatic Practice New CBSE - 2021 Question Paper Code 065 informatic Practice New CBSE - 2021
Question Paper Code 065 informatic Practice New CBSE - 2021
 
Informatics Practices (new) solution CBSE 2021, Compartment, improvement ex...
Informatics Practices (new) solution CBSE  2021, Compartment,  improvement ex...Informatics Practices (new) solution CBSE  2021, Compartment,  improvement ex...
Informatics Practices (new) solution CBSE 2021, Compartment, improvement ex...
 
FP305 data structure PAPER FINAL SEM 3
FP305 data structure PAPER FINAL SEM 3FP305 data structure PAPER FINAL SEM 3
FP305 data structure PAPER FINAL SEM 3
 
FP305 data structure june 2012
FP305   data structure june 2012FP305   data structure june 2012
FP305 data structure june 2012
 
Data structures question paper anna university
Data structures question paper anna universityData structures question paper anna university
Data structures question paper anna university
 
7th semester Computer Science and Information Science Engg (2013 December) Qu...
7th semester Computer Science and Information Science Engg (2013 December) Qu...7th semester Computer Science and Information Science Engg (2013 December) Qu...
7th semester Computer Science and Information Science Engg (2013 December) Qu...
 
L6
L6L6
L6
 
C programming session 05
C programming session 05C programming session 05
C programming session 05
 
Automata And Compiler Design
Automata And Compiler DesignAutomata And Compiler Design
Automata And Compiler Design
 
important C questions and_answers praveensomesh
important C questions and_answers praveensomeshimportant C questions and_answers praveensomesh
important C questions and_answers praveensomesh
 
Computer science sqp
Computer science sqpComputer science sqp
Computer science sqp
 
09 a1ec01 c programming and data structures
09 a1ec01 c programming and data structures09 a1ec01 c programming and data structures
09 a1ec01 c programming and data structures
 
7th Semester (June; July-2015) Computer Science and Information Science Engin...
7th Semester (June; July-2015) Computer Science and Information Science Engin...7th Semester (June; July-2015) Computer Science and Information Science Engin...
7th Semester (June; July-2015) Computer Science and Information Science Engin...
 
Gate-Cs 1996
Gate-Cs 1996Gate-Cs 1996
Gate-Cs 1996
 

Viewers also liked

Jenis parit on construction
Jenis parit on construction Jenis parit on construction
Jenis parit on construction Catim Bintara
 
Bus 335 staffing organizations week 10 quiz
Bus 335 staffing organizations week 10 quizBus 335 staffing organizations week 10 quiz
Bus 335 staffing organizations week 10 quizMaryLouis2018
 
151013 praktijkmiddag schiedam rotterdam 10 stappenplan clusteranalyse
151013 praktijkmiddag schiedam   rotterdam  10 stappenplan clusteranalyse151013 praktijkmiddag schiedam   rotterdam  10 stappenplan clusteranalyse
151013 praktijkmiddag schiedam rotterdam 10 stappenplan clusteranalyseKING
 
Conociendo las escrituras el reino de los cielos - parte 3
Conociendo las escrituras   el reino de los cielos - parte 3Conociendo las escrituras   el reino de los cielos - parte 3
Conociendo las escrituras el reino de los cielos - parte 3Misterio Escondido
 
Operating System - Monitors (Presentation)
Operating System - Monitors (Presentation)Operating System - Monitors (Presentation)
Operating System - Monitors (Presentation)Experts Desk
 
Geo 9º ano 1ª avaliação 1ª etapa 2017 a gabarito
Geo 9º ano 1ª avaliação 1ª etapa 2017 a gabaritoGeo 9º ano 1ª avaliação 1ª etapa 2017 a gabarito
Geo 9º ano 1ª avaliação 1ª etapa 2017 a gabaritoCBM
 

Viewers also liked (10)

Aman C.V
Aman C.VAman C.V
Aman C.V
 
Cherokee story
Cherokee storyCherokee story
Cherokee story
 
Zo Magazine.PDF
Zo Magazine.PDFZo Magazine.PDF
Zo Magazine.PDF
 
Brandofbrothers longwood
Brandofbrothers longwoodBrandofbrothers longwood
Brandofbrothers longwood
 
Jenis parit on construction
Jenis parit on construction Jenis parit on construction
Jenis parit on construction
 
Bus 335 staffing organizations week 10 quiz
Bus 335 staffing organizations week 10 quizBus 335 staffing organizations week 10 quiz
Bus 335 staffing organizations week 10 quiz
 
151013 praktijkmiddag schiedam rotterdam 10 stappenplan clusteranalyse
151013 praktijkmiddag schiedam   rotterdam  10 stappenplan clusteranalyse151013 praktijkmiddag schiedam   rotterdam  10 stappenplan clusteranalyse
151013 praktijkmiddag schiedam rotterdam 10 stappenplan clusteranalyse
 
Conociendo las escrituras el reino de los cielos - parte 3
Conociendo las escrituras   el reino de los cielos - parte 3Conociendo las escrituras   el reino de los cielos - parte 3
Conociendo las escrituras el reino de los cielos - parte 3
 
Operating System - Monitors (Presentation)
Operating System - Monitors (Presentation)Operating System - Monitors (Presentation)
Operating System - Monitors (Presentation)
 
Geo 9º ano 1ª avaliação 1ª etapa 2017 a gabarito
Geo 9º ano 1ª avaliação 1ª etapa 2017 a gabaritoGeo 9º ano 1ª avaliação 1ª etapa 2017 a gabarito
Geo 9º ano 1ª avaliação 1ª etapa 2017 a gabarito
 

Similar to Sp 1418794917

CBSE Grade12, Computer Science, Sample Question Paper
CBSE Grade12, Computer Science, Sample Question PaperCBSE Grade12, Computer Science, Sample Question Paper
CBSE Grade12, Computer Science, Sample Question PaperMalathi Senthil
 
Computer science sqp
Computer science sqpComputer science sqp
Computer science sqpB Bhuvanesh
 
Cbse question paper class_xii_paper_2000
Cbse question paper class_xii_paper_2000Cbse question paper class_xii_paper_2000
Cbse question paper class_xii_paper_2000Deepak Singh
 
CBSE Question Paper Computer Science with C++ 2011
CBSE Question Paper Computer Science with C++ 2011CBSE Question Paper Computer Science with C++ 2011
CBSE Question Paper Computer Science with C++ 2011Deepak Singh
 
computer science sample papers 2
computer science sample papers 2computer science sample papers 2
computer science sample papers 2Swarup Kumar Boro
 
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2Knowledge Center Computer
 
Class 12 computer sample paper with answers
Class 12 computer sample paper with answersClass 12 computer sample paper with answers
Class 12 computer sample paper with answersdebarghyamukherjee60
 
17432 object oriented programming
17432   object oriented programming17432   object oriented programming
17432 object oriented programmingsoni_nits
 
information practices cbse based paper.docx
information practices cbse based paper.docxinformation practices cbse based paper.docx
information practices cbse based paper.docxKapilSidhpuria3
 
Informatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paper
Informatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paperInformatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paper
Informatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paperHarish Gyanani
 

Similar to Sp 1418794917 (20)

CBSE Grade12, Computer Science, Sample Question Paper
CBSE Grade12, Computer Science, Sample Question PaperCBSE Grade12, Computer Science, Sample Question Paper
CBSE Grade12, Computer Science, Sample Question Paper
 
Computer science sqp
Computer science sqpComputer science sqp
Computer science sqp
 
Cbse marking scheme 2006 2011
Cbse marking scheme 2006  2011Cbse marking scheme 2006  2011
Cbse marking scheme 2006 2011
 
Cbse question paper class_xii_paper_2000
Cbse question paper class_xii_paper_2000Cbse question paper class_xii_paper_2000
Cbse question paper class_xii_paper_2000
 
Cs practical file
Cs practical fileCs practical file
Cs practical file
 
Revision1 C programming
Revision1 C programmingRevision1 C programming
Revision1 C programming
 
CBSE Question Paper Computer Science with C++ 2011
CBSE Question Paper Computer Science with C++ 2011CBSE Question Paper Computer Science with C++ 2011
CBSE Question Paper Computer Science with C++ 2011
 
computer science sample papers 2
computer science sample papers 2computer science sample papers 2
computer science sample papers 2
 
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
 
Mmt 001
Mmt 001Mmt 001
Mmt 001
 
Class 12 computer sample paper with answers
Class 12 computer sample paper with answersClass 12 computer sample paper with answers
Class 12 computer sample paper with answers
 
17432 object oriented programming
17432   object oriented programming17432   object oriented programming
17432 object oriented programming
 
information practices cbse based paper.docx
information practices cbse based paper.docxinformation practices cbse based paper.docx
information practices cbse based paper.docx
 
Doc 20180130-wa0006
Doc 20180130-wa0006Doc 20180130-wa0006
Doc 20180130-wa0006
 
Ip xi iii_ut_14-15
Ip xi iii_ut_14-15Ip xi iii_ut_14-15
Ip xi iii_ut_14-15
 
Informatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paper
Informatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paperInformatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paper
Informatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paper
 
Pcd201516
Pcd201516Pcd201516
Pcd201516
 
Sample paper
Sample paperSample paper
Sample paper
 
Bc0037
Bc0037Bc0037
Bc0037
 
Oops qb cse
Oops qb cseOops qb cse
Oops qb cse
 

Recently uploaded

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 

Recently uploaded (20)

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 

Sp 1418794917

  • 1. Sample Paper Class – XII Subject – Computer Science Time Allowed: 3hours Maximum Marks: 70 Note. (i) All questions are compulsory. (ii) Programming Language: C+ + Ques 1. (a) Differentiate between a global variable and a local variable. Also give suitable example in C++. 2 (b) Name the Header file(s), to which the following built-in functions belongs to: 1 (i)isdigit ( ) ( ii) gotoxy ( ) (c) Rewrite the following program after removing syntactical error(s) if any. Underline each correction. 2 #include<iostream.h> void main( ) { struct movie { char movie_name[20]; char movie_type; int tickets=100; } MOVIE; gets(movie_name); gets(movie_type); } (d) Find the output of the following program (Assuming that all required header files are included) 3 void main( ) { char * NAME = “admiNStrAtiOn”; for( int x=0;x<strlen(NAME);x++) if(islower(NAME[x]) NAME[x] = toupper(NAME[x]); else if(isupper (NAME[x])) if(x%2==0) NAME[x] = NAME[x -1]; else NAME[x]--; cout<<NAME <<endl; } (e) Find the output of the following program 2 #include<iostream.h> void Modify(int &a, int b=10) { if(b%10==0) a+=5; for(int i=5;i<=a;i++) cout<<b++<<.:.; cout<<endl; } void Disp(int x) { if(x%3==0) Modify(x); else Modify(x,3); }
  • 2. void main() { Disp(3); Disp(4); Modify(2,20); } (f) Observe the following program Game.cpp carefully, if the value of Num entered by user is 14, choose the correct possible output(s) from the option i) to iv) and justify your option. 2 Output options: i) 1 2 3 4 ii) 1 2 3 4 5 6 7 8 9 10 11 iii) 1 2 3 4 5 iv) None of the above Ques 2. (a) Differentiate between a default and a parameterized constructor in context of class and object. Give suitable example in C++. 2 (b) Answer the questions (i) and (ii) after going through the following class 2 class Computer { char C_name[20]; char Config[100]; public: Computer(Computer &obj); // function1 ~Computer(); //function 2 }; (i) Write the statement(s) which will invoke the function 1. (ii) Name the specific feature of the class shown by function 2. Also write the time of its invoke. (c) Define a class Travel in C++ with the description given below: 4 Private members: plancode of type long place of type characters array number_of_travellers of type integer number_of_buses of type integer Public members: A constructor to assign initial values of plancode as 1001, place as “Kolkata”, number_of_travellers as 5 and number_of_buses as 1 A function newplan( ) which allows user to enter plancode , place and number_of_travellers and also assign the number_of_buses as per the following conditions: number_of_travellers number_of_buses less than 20 2 equal to and more than 20 and less than 40 3 equal to and more than 40 4 A function show( ) to display the contents of all the data members on the screen. (d) Answer the questions (i) to (iv) based on the following code : 4 class Goods { int id; protected : char name[20];
  • 3. long qty; void Incr(int n); public : Goods(); ~Goods(); void get(); }; class Food_products : public Goods { char exp_dt[10]; protected : int id; int qty; public : void getd(); void showd(); }; class Cosmetics : private Goods { int qty; char exp_date[10]; protected : int id; public : ~Cosmetics(); Cosmetics(); void show(); }; (i) How many bytes will be required by an object of class Food_products. (ii) Name the member functions accessible through the object of class Food_products. (iii) From the following, Identify the member function(s) that cannot be called directly from the object of class Cosmetics show(), getd(), get() (iv) If the class cosmetics inherits the properties of food_products class also, then name the type of inheritance. Ques 3. (a) Write a function in C++ which accepts an integer array and its size as arguments and change all the even number with twice and odd with thrice. 3 Example: if an array of five elements initially contains the element as 2,4,1,5,7 then the function should rearrange the array as 4,8,3,15,21 (b) An array A[40][10] is stored in the memory along the column with each element occupying 4 bytes. Find out the Base address and address of the element A[3][6] if the element A[30][10] is stored at the address 9000. 3 (c) Write a function in C++ to delete a node containing names of student, from a dynamically allocated stack of names implemented with the help of following structure : 3 struct student { char name[20]; student *next; }; (d)W rite a function in C++ which accepts an integer array and its size as arguments/parameters and assign the elements into a two dimensional array of integer in the following format: 3 if the array is 1,2,3,4,5,6 if the array is 1,2,3 the resultant 2D array is given below the resultant 2D array is given below
  • 4. 1 2 3 4 5 6 1 2 3 1 2 3 4 5 0 1 2 0 1 2 3 4 0 0 1 0 0 1 2 3 0 0 0 1 2 0 0 0 0 1 0 0 0 0 0 (e) Evaluate the following postfix expression using a stack and show the contents of stack after execution of each operation : 25 8 3 - / 6 * 10 + 2 Ques 4. (a) Observe the program segment given below carefully and fill the blanks marked statement 1 and statement 2 using seekg( ) and tellg( ) function for performing the required task. 1 #include<fstream.h> class Employee {int Eno; char Ename[30]; public: int Countrec( ); //Function to count the total number of records }; int Employee:: Countrec( ) { fstream File; File.open(“Emp.Dat”,ios::binary||ios::in); ___________ // Statement 1 int Bytes = ________________ // Statement 2 int count = Bytes/sizeof(Employee); File.close( ); return count; } (b) Write a function in C++ to count and display the number of line starting with alphabet ‘A’ present in a text file “LINES.TXT”. 3 Example: if the file LINES.TXT contains the following lines: A boy is playing there. There is a playground. An aeroplane is in the sky. Alphabets and numbers are allowed in the password. Then the function should display the output as 3. (c) Assuming the class Computer as follows: 2 Class computer { char chiptype[10]; int speed; public: void getdetails( ) { gets(chiptype); cin>>speed; } void showdetails( ) { cout<<”Chip”<<chiptype<<”Speed=”<<speed<<endl; } }; Write a function readfile() to read all the records present in an already existing binary file “SHIP. DAT” and display them on the screen, also count the number of records present in the file.
  • 5. Ques.5 (a) What is relation? What is the difference between a tuple and an attribute? 2 (b) Write the SQL commands for the i) to iv) and write the output of the v) on the basis of table teacher 6 6 i) To show all information about the teacher of History department. ii) To list the names of female teachers who are in Maths department. iii) To list names of all teachers with their date of admission in ascending order. iv)To insert a new row in TEACHER table with the data: 9,’Raja’, 26,’Computer’, {13/05/95}, 23000,’M’ v)Give the output of the following SQL statements. a. Select COUNT(distinct department) from TEACHER; b. Select MAX(Age) from TEACHER where SEX=’F’; c. Select AVG(Salary) from TEACHER where SEX=’M’; d. Select SUM(Salary) from TEACHER where DATOFJOIN<{12/07/96}; Ques 6 (a) State and verify Dsitributive law in Boolean Algebra. 2 Draw a logical circuit diagram for the following Boolean expression: A.(B+C)’ 2 (b) Convert the following Boolean expression into its equivalent Canonical Sum of Products Form (U’+V’+W’). (U+V’+W’). (U+V+W) 1 (c) Reduce the following Boolean expression using K-map 3 F(A,B,C,D)= Σ(1,3,4,5,7,9,11,12,13,14) Ques:7 (a) Differentiate between Internet and Intranet. 2 (b) Expand the following ii) CDMA (ii) URL 1 (c) Knowledge Supplement Organization has set up its new centre at Manglore for its office and web based activities. It has four buildings as shown in the diagram below: 4 Center to center distance between various buildings Number of Computers Alpha to Beta 50m Alpha 25 Beta to Gamma 150m Beta 50 Gamma to Lambda 25m Gamma 125 Alpha to Lambda 170m Lambda 10 Beta to Lambda 125m Alpha to Gamma 90m i) Suggest a cable layout of connections between the buildings ii) Suggest the most suitable place(i.e building) to house the server of this organization with a suitable reason iii)Suggest the placement of the following devices with justification: Repeater Hub/Switch No. Name Age Department Dateofadm Salary Sex 1 Jugal 34 Computer 10/01/97 12000 M 2 Sharmila 31 History 24/03/98 20000 F 3 Sandeep 32 Maths 12/12/96 30000 M 4 Sangeeta 35 History 01/07/99 40000 F 5 Rakesh 42 Maths 05/09/97 25000 M 6 Shyam 50 History 37/06/98 30000 M 7 Shivam 44 Computer 25/02/97 21000 M 8 Shalakha 33 Maths 31/07/97 20000 F Al ph a G a m m aB et a La mbd a
  • 6. iv) The organization is planning to link its front office situated in the city in a hilly region where cable connection is not feasible, suggest an economic way to connect it with reasonably high speed? (d) What do you mean by Free Software and OSI? 2 (e) Name any two cyber crimes. 1 Sample Paper Class – XII Subject – Computer Science Time Allowed: 3hours Maximum Marks: 70 Note. (i) All questions are compulsory. (ii) Programming Language: C+ + Ques 1. (a) Differentiate between a global variable and a local variable. Also give suitable example in C++. 2 (b) Name the Header file(s), to which the following built-in functions belongs to: 1 (i)isdigit ( ) ( ii) gotoxy ( ) (c) Rewrite the following program after removing syntactical error(s) if any. Underline each correction. 2 #include<iostream.h> void main( ) { struct movie { char movie_name[20]; char movie_type; int tickets=100; } MOVIE; gets(movie_name); gets(movie_type); } (d) Find the output of the following program (Assuming that all required header files are included) 3 void main( ) { char * NAME = “admiNStrAtiOn”; for( int x=0;x<strlen(NAME);x++) if(islower(NAME[x]) NAME[x] = toupper(NAME[x]); else if(isupper (NAME[x])) if(x%2==0) NAME[x] = NAME[x -1]; else NAME[x]--; cout<<NAME <<endl; } (e) Find the output of the following program 2 #include<iostream.h> void Modify(int &a, int b=10) { if(b%10==0) a+=5; for(int i=5;i<=a;i++) cout<<b++<<.:.; cout<<endl; } void Disp(int x) { if(x%3==0) Modify(x);
  • 7. else Modify(x,3); } void main() { Disp(3); Disp(4); Modify(2,20); } (f) Observe the following program Game.cpp carefully, if the value of Num entered by user is 14, choose the correct possible output(s) from the option i) to iv) and justify your option. 2 Output options: v) 1 2 3 4 vi) 1 2 3 4 5 6 7 8 9 10 11 vii) 1 2 3 4 5 viii) None of the above Ques 2. (a) Differentiate between a default and a parameterized constructor in context of class and object. Give suitable example in C++. 2 (b) Answer the questions (i) and (ii) after going through the following class 2 class Computer { char C_name[20]; char Config[100]; public: Computer(Computer &obj); // function1 ~Computer(); //function 2 }; (i) Write the statement(s) which will invoke the function 1. (ii) Name the specific feature of the class shown by function 2. Also write the time of its invoke. (c) Define a class Travel in C++ with the description given below: 4 Private members: plancode of type long place of type characters array number_of_travellers of type integer number_of_buses of type integer Public members: A constructor to assign initial values of plancode as 1001, place as “Kolkata”, number_of_travellers as 5 and number_of_buses as 1 A function newplan( ) which allows user to enter plancode , place and number_of_travellers and also assign the number_of_buses as per the following conditions: number_of_travellers number_of_buses less than 20 2 equal to and more than 20 and less than 40 3 equal to and more than 40 4 A function show( ) to display the contents of all the data members on the screen. (d) Answer the questions (i) to (iv) based on the following code : 4
  • 8. class Goods { int id; protected : char name[20]; long qty; void Incr(int n); public : Goods(); ~Goods(); void get(); }; class Food_products : public Goods { char exp_dt[10]; protected : int id; int qty; public : void getd(); void showd(); }; class Cosmetics : private Goods { int qty; char exp_date[10]; protected : int id; public : ~Cosmetics(); Cosmetics(); void show(); }; (i) How many bytes will be required by an object of class Food_products. (ii) Name the member functions accessible through the object of class Food_products. (iii) From the following, Identify the member function(s) that cannot be called directly from the object of class Cosmetics show(), getd(), get() (iv) If the class cosmetics inherits the properties of food_products class also, then name the type of inheritance. Ques 3. (a) Write a function in C++ which accepts an integer array and its size as arguments and change all the even number with twice and odd with thrice. 3 Example: if an array of five elements initially contains the element as 2,4,1,5,7 then the function should rearrange the array as 4,8,3,15,21 (b) An array A[40][10] is stored in the memory along the column with each element occupying 4 bytes. Find out the Base address and address of the element A[3][6] if the element A[30][10] is stored at the address 9000. 3 (c) Write a function in C++ to delete a node containing names of student, from a dynamically allocated stack of names implemented with the help of following structure : 3 struct student { char name[20]; student *next; };
  • 9. (d)W rite a function in C++ which accepts an integer array and its size as arguments/parameters and assign the elements into a two dimensional array of integer in the following format: 3 if the array is 1,2,3,4,5,6 if the array is 1,2,3 the resultant 2D array is given below the resultant 2D array is given below 1 2 3 4 5 6 1 2 3 1 2 3 4 5 0 1 2 0 1 2 3 4 0 0 1 0 0 1 2 3 0 0 0 1 2 0 0 0 0 1 0 0 0 0 0 (e) Evaluate the following postfix expression using a stack and show the contents of stack after execution of each operation : 25 8 3 - / 6 * 10 + 2 Ques 4. (d) Observe the program segment given below carefully and fill the blanks marked statement 1 and statement 2 using seekg( ) and tellg( ) function for performing the required task. 1 #include<fstream.h> class Employee {int Eno; char Ename[30]; public: int Countrec( ); //Function to count the total number of records }; int Employee:: Countrec( ) { fstream File; File.open(“Emp.Dat”,ios::binary||ios::in); ___________ // Statement 1 int Bytes = ________________ // Statement 2 int count = Bytes/sizeof(Employee); File.close( ); return count; } (e) Write a function in C++ to count and display the number of line starting with alphabet ‘A’ present in a text file “LINES.TXT”. 3 Example: if the file LINES.TXT contains the following lines: A boy is playing there. There is a playground. An aeroplane is in the sky. Alphabets and numbers are allowed in the password. Then the function should display the output as 3. (f) Assuming the class Computer as follows: 2 Class computer { char chiptype[10]; int speed; public: void getdetails( ) { gets(chiptype); cin>>speed; } void showdetails( ) { cout<<”Chip”<<chiptype<<”Speed=”<<speed<<endl;
  • 10. } }; Write a function readfile() to read all the records present in an already existing binary file “SHIP. DAT” and display them on the screen, also count the number of records present in the file. Ques.5 (c) What is relation? What is the difference between a tuple and an attribute? 2 (d) Write the SQL commands for the i) to iv) and write the output of the v) on the basis of table teacher 6 6 iv) To show all information about the teacher of History department. v) To list the names of female teachers who are in Maths department. vi) To list names of all teachers with their date of admission in ascending order. iv)To insert a new row in TEACHER table with the data: 9,’Raja’, 26,’Computer’, {13/05/95}, 23000,’M’ v)Give the output of the following SQL statements. e. Select COUNT(distinct department) from TEACHER; f. Select MAX(Age) from TEACHER where SEX=’F’; g. Select AVG(Salary) from TEACHER where SEX=’M’; h. Select SUM(Salary) from TEACHER where DATOFJOIN<{12/07/96}; Ques 6 (d) State and verify Dsitributive law in Boolean Algebra. 2 Draw a logical circuit diagram for the following Boolean expression: A.(B+C)’ 2 (e) Convert the following Boolean expression into its equivalent Canonical Sum of Products Form (U’+V’+W’). (U+V’+W’). (U+V+W) 1 (f) Reduce the following Boolean expression using K-map 3 F(A,B,C,D)= Σ(1,3,4,5,7,9,11,12,13,14) Ques:7 (f) Differentiate between Internet and Intranet. 2 (g) Expand the following ii) CDMA (ii) URL 1 (h) Knowledge Supplement Organization has set up its new centre at Manglore for its office and web based activities. It has four buildings as shown in the diagram below: 4 Center to center distance between various buildings Number of Computers Alpha to Beta 50m Alpha 25 Beta to Gamma 150m Beta 50 Gamma to Lambda 25m Gamma 125 Alpha to Lambda 170m Lambda 10 Beta to Lambda 125m Alpha to Gamma 90m No. Name Age Department Dateofadm Salary Sex 1 Jugal 34 Computer 10/01/97 12000 M 2 Sharmila 31 History 24/03/98 20000 F 3 Sandeep 32 Maths 12/12/96 30000 M 4 Sangeeta 35 History 01/07/99 40000 F 5 Rakesh 42 Maths 05/09/97 25000 M 6 Shyam 50 History 37/06/98 30000 M 7 Shivam 44 Computer 25/02/97 21000 M 8 Shalakha 33 Maths 31/07/97 20000 F Al ph a G a m m aB et a La mbd a
  • 11. i) Suggest a cable layout of connections between the buildings ii) Suggest the most suitable place(i.e building) to house the server of this organization with a suitable reason iii)Suggest the placement of the following devices with justification: Repeater Hub/Switch iv) The organization is planning to link its front office situated in the city in a hilly region where cable connection is not feasible, suggest an economic way to connect it with reasonably high speed? (i) What do you mean by Free Software and OSI? 2 (j) Name any two cyber crimes. 1