CBSE India | CBSE AIEEE Sample Papers | CBSE Class X | CBSE Class XII | CBSE Results | CBSE Syllabus | CBSE Sample Papers | CBSE Datesheet | CBSE Exams | CBSE Schools in India | CBSE Guess Papers | CBSE PMT

» CBSE Computer Science Sample Question Paper - Year 1998 : CBSE Sample Question Papers

CBSE Computer Science Sample Question Paper - Year 1998

Computer Science Class XII (CBSE)
You are on questions

Q no. 1 (a) Define the following terms: (i) Inheritance (ii) Encapsulation.

Q no. 1 (b) Name the header files, to which the following built-in-functions belong to:
(i) cos() (ii) setw() (iii) toupper() (iv) strcpy()

Q no. 1 © Find the syntax error(s), if any, in the following program:
include
void main( )
{
int R;W=90;
while W>60
{
R=W-50;
switch(W)
{
20: cout< <"Lower Range"< 30: cout<<"Middle Range"< 40: cout<<"Higher Range"< }
}
}

Q no. 1 (d) Give the output of the following program segment:
char *NAME="IntRAneT";
for(int x=0;x if(islower(NAME[x]) )
NAME [ x] = toupper ( NAME [x]);
else
if(isupper(NAME [x] ) )
if( x%2==0)
NAME [x] = tolower ( NAME [x] );
else
Name [x] = NAME [ x - 1 ];
puts(NAME);

Q no. 1 (e) Write the output of the following program:
#include
void Execute(int &X, int Y=200)
{
int TEMP=X+Y;
X+=TEMP;
if (Y!=200)
cout< }

void main ( )
{
int A=50, B=20;
Execute (B);
cout<< A< Execute( A, B);
cout < }

Q no. 1 ( f ) Write a C++ function having two value parameters X and N with result type float to find the sum of series given
below:

Image no.1

Q no. 2 (a) What is a copy constructor? What do you understand by constructor overloading?

Q no. 2 (b) Define a class student with the following specifications:

admno
sname
eng, math, science
total
ctotal()

integer
20 character
float
float
A function to calculate eng+math+science with float return type

public member functions of class student

Takedata()

Showdata()

function to accept values for admno, sname, eng, math, science and
invoke ctotal to calculate total.

function to display all the data members on the screen

Q no. 2 © Consider the following declarations and answer the questions given below:
class PPP
{

int H;
protected:
int S;

public:
void INPUT(int);
void OUT( );
};

class QQQ: private PPP
{
int T;
protected:
int U;
public: void INDATA(int, int);
void OUTDATA();
};
class RRR: public QQQ
{
int M;
public:
void DISP(void);
};

(i) Name the base class and derived class of the class QQQ.
(ii) Name the data member(s) that can be accessed from function DISP().
(iii) Name the member function(s), which can be accessed from the objects of class RRR.
(iv) Is the member function OUT() accessible by the objects of the class QQQ?

Q no. 3 (a) Suppose an array P containing float is arranged in ascending order. Write a user defined function in C++ to search for one float from P with the help of binary search method. The function should return an integer 0 to show absence of the number and integer 1 to show presence of the number in the array. The function should have the parameters as (1) an array P (2) the number DATA to be searched (3) number of elements N.

Q no. 3 (b) An array T[15][10] is stored in the memory with each element requiring 2 bytes of storage. If the base address of T is 2000, determine the location of T[7][8] when the array is stored by (i) Row major (ii) Column major.

Q no. 3 © Write a user defined function in C++ to display the sum of column elements of a two dimensional array R[7][7] containing integers.

Q no. 3 (d) Evaluate the following postfix expression using a stack and show the contents of stack after execution of each operation: 50, 40, +, 18, 14, -, 4, *, +

Q no. 3 (e) Give the necessary declaration of a linked implemented stack containing integer type numbers; also write a user defined function in C++ to pop a number from this stack.

Q no. 4 (a) Write name of two member functions belonging to fstream class.

Q no. 4 (b) Assuming the class EMPLOYEE given below, write functions in C++ to perform the following:
(i) Write the objects of EMPLOYEE to a binary file.
(ii) Read the objects of EMPLOYEE from binary file and display them on the screen.
class EMPLOYEE
{
int ENO;
char ENAME[10];
public:
void GETIT( )
{
cin>>ENO;
gets(ENAME);
}
void SHOWIT( )
{
cout< < ENO< }
};

Q No.5 (a) What is a relation? What is the difference between a tuple and an attribute?
NOTE: Write SQL commands for (b) to (g) and write the outputs for (h) on the basis of table HOSPITAL

No. Name Age Department DatoFadm Charges Sex
1 Arpit 62 Surgery 21/01/98 300 M
2 Zareena 22 ENT 12/12/97 250 F
3 Kareem 32 Orthopedic 19/02/98 200 M
4 Arun 12 Surgery 11/01/98 300 M
5 Zubin 30 ENT 12/01/98 250 M
6 Ketaki 16 ENT 24/02/98 250 F
7 Ankita 29 Cardiology 20/02/98 800 F
8 Zareen 45 Gynecology 22/02/98 300 F
9 Kush 19 Cardiology 13/01/98 800 M
10 Shilpa 23 Nuclear Medicine 21/02/98 400 F

(b) To select all the information of patients of cardiology department.
© To list the names of female patients who are in ENT department.
(d) To list names of all patients with their date of admission in ascending order.
(e) To display Patient’s Nae, Charges, Age for only female patients.
(f) To count the number of patients with Age<30.
(g) To insert a new row in the HOSPITAL table with the following data: 11, “Aftab", 24, “Surgery", {25/02/98}, 300, “M”
(h) Give the output of the following SQL statements:
(i) Select COUNT(DISTINCT charges) from HOSPITAL;
(ii) Select MIN(Age) from HOSPITAL where Sex="F";
(iii) Select SUM(Charges) from HOSPITAL where Department="ENT";
(iv) Select AVG(Charges) from HOSPITAL where Datofadm< {12/02/98};

Q no. 6 (a) State Demorgan’s laws. Verify one of the Demorgan’s laws using truth tables.

Q no. 6 (b) Prove X+Y’Z=(X+Y’+Z’)(X+Y’+Z)(X+Y+Z) algerbraically.

Q no. 6 © Write the dual of the Boolean expression (U+W)(V’U+W)

Q no. 6 (d) Obtain a simplified form for a Boolean expression:F( U, V, W,Z) = S ( 0,1,3,5,7,9,10,11,12,13,14,15)

Q no. 6 (e) Draw the logic circuit for a half-adder.

Q no. 6 (f) Represent the Boolean expression X+Y.Z’ with the help of NOR gates only.

Q no. 6 (g) Write the Product of Sum form of the function H(U,V,W), truth table representation of H is as follows:

U V W H
0 0 0 1
0 0 1 0
0 1 0 1
0 1 1 0
1 0 0 0
1 0 1 1
1 1 0 0
1 1 1 1

Q No. 7 (a) What are repeaters?

Q no. 7 (b) What is the difference between LAN and MAN?

Q no. 7 © Describe the following in brief: (i) MOSAIC (ii) Usenet

Q no. 7 (d) What do you understand by a backbone network?

Related CBSE Information

CBSE Computer Science Sample Question Paper - Year 2000

Computer Science Class XII (CBSE) You are on questions 1 to 3 Max Marks : 75 Time allowed : 3 hrs Q 1. (a) Illustrate the concept of function overloading with the help of an example? Q 1 (b) Name the header file, to which following built-in function belong: (i)isupper( ) (ii)setw( ) (iii)exp( ) (iv)strcmp( ) Q 1 (c) Will the following program execute successfully? If not, state the reason(s). #include void main() { int s1,s2,num; s1=s2=0; for(x=0;x<11;x++) { cin< 0) s1+=num; else s2=/num; } cout<

CBSE Computer Science Sample Question Paper - Year 1999

Computer Science Class XII (CBSE) You are on questions Q 1 (a) Why main function is so special. Give two reasons? Q 1 (b) Name the header file of C++ to which following functions belong: (i) strcat() (ii) scanf() (iii) getchar() (iv) clrscr() Q 1 (c) Find the syntax error(s), if any, in the following program: #include main() { int x[5],*y,z[5]; for(i=0;i<5;i++) { x[i]=i; z[i]=i+3; y=z; x=y; } } Q 1 (d) Give the output of the following program. #include void main() { char *p="Difficult"; char c; c=*p++; printf("%c",c); } Q 1 (e) Write the output of the following program. #include static int i=100; void abc() { static int i=8; cout<

CBSE Accounts Sample Question Paper - Year 1999

Accounts Class - XII (CBSE) You are on Set no I Qno. 1 to 9 Q1) List any two items appearing on the credit side of a partner's capital account, when capitals are fluctuating. (Marks 2) Q2) (a) A and B are partners in a firm sharing profits in the ratio of 3 : 2. They had advanced to the firm a sum of Rs. 30,000/- as a loan in their profit sharing ratio on July 1st, 1998. The partnership deed is silent on the question of interest on loan from partners. Compute the interest payable by the firm to the

CBSE Physics Magnetism Expected Questions : Unit V

Very Short Answer Type Question Q. 1. What is the difference between magnetic length and length of a magnet ? Answer Q. 2. What happens if a bar magnet is cut into two pieces (i) transverse to its length along its length ? Answer Q. 3. Can two poles of a magnet be seperated ? Answer Q. 4. What is Gauss's law of magnetism ? Answer Q. 5. How would have Gauss's theorem been modified if monopoles existed ? Answer Q. 6. Can a magnetic field configuration have three poles ? Answer Q. 7.

CBSE Science Sample Question Paper - Year 1998

Science Class X (CBSE) You are on questions Max Marks : 75 Time allowed : 3 hrs General Instructions : (i) All questions are compulsary. (ii) Question number 1 to 10 are very short answer question,carrying 1 mark each.They are to be answered in one or two sentences. (iii) Question number 11 to 20 are short answer questions,each carrying 2 marks. Answer to them should not exceed 40 words each. (iv) Question numbers 21 to 30 are also short answer questions,each carrying 3 marks. Answer to them should not exceed 60 words each. (v) Question numbers 31 to 33 are long answer questions,each carrying 5