Sie sind auf Seite 1von 8

GUESS PAPER-1

COMPUTER SCIENCE (083)


Class-XII
TIME : 3 hours
MM : 70
General Instructions:All questions are compulsory.
1. (a) What is the difference between auto and static variables. Explain
with suitable example.
(b) Name the Header file(s) that shall be needed for successful
compilation of the following C++ code?
void main( )
{ char st[20];
cin.getline(st,15);
if(islower(st[0]))
cout<<Starts with alphabet;
else
cout<<strlen(st);
}
(c) In the following program, find the correct possible output(s) from the
options with justification.
2
#include<iostream.h>
#include<stdlib.h>
void main()
{
randomize();
char *city[]={"PKD", "TVM", "KOL", "CAL"};
int ZEN;
for( int i=0; i<3;i++)
{
ZEN=random(2)+1;
cout<<city[ZEN]<< '@';
}}
i.
PKD@TVM@TVM@
ii.
TVM@KOL@TVM@
iii.
TVM@KOL@KOL@
iv.
TVM@CAL@TVM@
(d) Find the output of the following program segment (Assuming that
all required header files are included in the program) :

2
1

typedef char *string;


void main()
{char *Notes;
string str="CbSe EXAM-15";
int L=5;
Notes=str;
while(L<=7)
{
str[L]=(isupper(str[L])?tolower(str[L]):toupper(str[L]));
Notes=str+L;
cout<<Notes<<endl;
L++;
}
}
(e)

Find the output of the following program.

XII-CS 2014-15

2
Page 1 of 8

#include <iostream.h>
#include<conio.h>
extern int start=100;
void prnseries()
{
static int start=10;
start=start/2;
cout<<start<<":\t";

(f)

2.

(a)

}
void main()
{
int i=3;
clrscr();
for(int j=1;j<=i;j++)
prnseries();
cout<< "\n"<<"start="<<start;
getch();
}
Find the output of the following program:
#include<iostream.h>
#include<conio.h>
#include<ctype.h>
class Class
{
int Cno,total;
char section;
public:
Class(int no=1)
{
Cno=no;
section='A';
total=30;
}
void admission(Class &C,int c=20)
{
C.section++;
C.total+=c;
}
void ClassShow()
{
cout<<Cno<<":"<<section<<":"<<total<<endl;
}} ;
void main()
{Class C1(5),C2(7);
C1.admission(C2);
C2.admission(C1,5);
C1.ClassShow();
C2.ClassShow();
}
How private inheritance mode is different from private visibility
mode? Explain with example.

XII-CS 2014-15

Page 2 of 8

(b)

Answer the questions (i) and (ii) after going through the following class:

void main()
{
Conference CF(50); //statement-1
CF.session(); //statement-2

ii) What output will be produced on execution of statement1 & 2 repectively.


(c)

Define a class named STREAM in C++ with following description:


Private Members:
admno
Integer //Admission No.
cname
Array of Characters //Candidate Name
Percentage
Float
FEES
Float
Stream
string

A function AssignStreamNFees() to choose students for different streams depending


upon their percentage and assign the fees they have to deposit as given below:
Percentage
XII-CS 2014-15

Stream

Fees
Page 3 of 8

(d)

(i)
(ii)
(iii)
(iv)

Percentage >= 90
Science
20000
Percentage <90 but >=80
Commerce
18000
Percentage <80 but >= 70
Arts
14000
Public Members:
i)
A constructor to input the values of admno, cname and Percentage and
invoke AssignStreamNFees().
ii)
A function showData( ) to display the value of all the data members.
Answer the questions (i) to (iv) based on the following:
class CUSTOMER
{
int Cust_no;
protected:
void Register();
public:
CUSTOMER();
void Status();
char Cust_Name[20];
};
class SALESMAN: public CUSTOMER
{
int Salesman_no;
char Salesman_Name[20];
protected:
float Salary;
public:
SALESMAN();
void Enter();
void Show();
};
class SHOP : private CUSTOMER
{char Voucher_No[10];
char Sales_Date[8];
public:
SHOP();
void Sales_Entry();
void Sales_Detail();
};
Write the names of data members which are accessible from objects belonging to class
SHOP.
Write the names of all the member functions which are accessible from objects of
class SALESMAN.
Write the names of all the members which are accessible from member functions of
class SHOP.
How many bytes will be required by an object belonging to class SALESMAN?

XII-CS 2014-15

Page 4 of 8

3. (a)

2
STAC

(b)

(c)

(d)

(e)

Evaluate the following postfix expression and show status of stack after each
operation.

(f)

Convert the following infix expression to its equivalent postfix expression showing
the stack contents for the conversion: A * ( B + D ) / E F (G + H / K)
Write a function in C++ to count and display the number of four letter words in the
file
WORDS.TXT.
2
Example: If the file contains:
This is a C++ book. It contains good programming questions.
Then the output should be: 2
Consider the class VINTAGE declared below, write a C++ function to read the objects of
VINTAGE from binary file VINTAGE.dat and display those vehicles that are priced
between 200000 and 250000.

4. (a)

(b)

XII-CS 2014-15

Page 5 of 8

(c)

(a)

Observe the program segment given below carefully and fill the
blanks
marked as Statement 1 and Statement 2 using seekp() and seekg()
functions
for performing the required task. 1
#include <fstream.h>
class Item
{int Ino;char Item[20];
public:
//Function to search and display the content from a particular record
number
void Search(int );
//Function to modify the content of a particular record number
void Modify(int);
};
void Item::Search(int RecNo)
{fstream File;
File.open("STOCK.DAT",ios::binary|ios::in);
______________________ //Statement 1
File.read((char*)this,sizeof(Item));
cout<<Ino<<"==>"<<Item<<endl;
File.close();
}
void Item::Modify(int RecNo)
{fstream File;
File.open("STOCK.DAT",ios::binary|ios::in|ios::out);
cout>>Ino;
File.getline(Item,20);
______________________ //Statement 2
File.write((char*)this,sizeof(Item));
File.close();
(i) Explain Unique key with example.

XII-CS 2014-15

Page 6 of 8

(ii) A table GAMES has 6 columns and 5 rows. What will be its cardinality and
degree?
(b)

Write SQL commands for the following statements:


(i) To list the game code , game name of all those games played by 2 or more players.
(ii) To list player code & name of each player along with their schedule dates.
(iii) How many players are playing carom board.
(iv) List those games that are not played by any player.
(c) Give the output of the following queries:
(i) select count(distinct type) from games;
(ii) select max(scheduledate), min(scheduledate) from games where type= indoor;
(iii) select name, gamename from games g, player p where g.gcode=p.gcode and
g.prizemoney>10000;
(iv) select type, avg(prizemoney) from games group by type;
6. (a) Name the law shown below and verify it using Truth Table: X.
(b) Write
the canonical sum-of-product (SOP) form of the Boolean
(X+Y)=X
expression A'B + A'C
(c) Reduce the following Boolean Expression using K-Map:
F(u,v,z,w)= (0,1,3,4,5,6,7,9,10,11,13,15)
(d) Write the POS form of a Boolean function G in following truth table :

(e)

Seven NOT gates are cascaded one after another. What will be the output if input is 0.
Also show the diagram.
7. (a) Define the term Bandwidth. Give any one unit of Bandwidth.
(b) Name the device used to connect a computer to an Analog Telephone
Line.
(c) Expand the following terms:- (i) CDMA (ii) WLL
XII-CS 2014-15
Page 7 of 8

2
1
3
1

1
1
1
1

Main Compound to Resourc110m


Main Compound5
eMain
Compound
Compound to Training Compound
115m
Resource Compound
15
Main Compound to Finance Compound
35m
Training Compound
150
(d) to
Differentiate
between Telnet
1
Resource Compound
Training Compound
25m & FTP.
Finance Compound
20
Learn Together is an educational NGO. It is setting up its new campus at Jabalpur f
(e)
Resource Compound to Finance Compound 135m
or its web based
Training Compound to Finance Compound
100 m
Activities. The campus has four compounds as shown in the diagram below:
Mai
n
Com
pou

Reso
urce
Com
poun
Fina
nce
Com
pou

Train
ing
Com
poun
Centre to Centre Distance between the Compounds
Computers in Each Compound

No. of

(e1) Suggest an ideal cable layout for connecting these compounds and also topology
(e2) Suggest the most suitable place (i.e. compound) to install the server with suitable reason.
(e3) Which device should be procured by the company for connecting several computers in each

1
1
1

compound.

(e4) The NGO is planning to connect its International office situated in Mumbai.Which out of the

(f)
(g)

following wired communication link, you will suggest for very high speed connectivity?
a) Telephone Analog Line
b) Optical Fibre
c) Ethernet Cable
What is the difference between Worm and Virus?
Write any two important characteristics of Cloud Computing.

***

XII-CS 2014-15

Page 8 of 8

1
1

Das könnte Ihnen auch gefallen