eSiksha
 Login    Password        Sign Up   Forgot Password
Thursday, November 21, 2024


    

Site Search

 Schools
 Home
 
I.C.S.E.
 
C.B.S.E.
 
I.S.C.

 

T
R
A
C
K
S
 MBA
 
Engineering
 
Medical
 
Humanities
 
Sciences
 
Computers
 
Govt. Exams
 
Commerce
 
School/+2

Computer Science Class XII 1999(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<iostream.h>
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<stdio.h>
void main()
{
char *p="Difficult";
char c;
c=*p++;
printf("%c",c);
}


Q 1 (e) Write the output of the following program.

#include<iostream.h>
static int i=100;
void abc()
{
static int i=8;
cout<<"first="<<i;
}
main()
{
static int i=2;
abc();
cout<<"second="<<i<<endl;
}

 

Q 1 (f) Write a C++ function that converts a 2-digit octal number into binary number and prints the binary equivalent.

Q 2 (a) What do you understand by visibility modes in class derivations? What are these modes?


Q 2 (b) Define a class Teacher with the following class specification:
private members:
name 20 characters
subject 10 characters
Basic, DA, HRA float
salary float
Calculate() function computes the salary and returns it.
salary is sum of Basic, DA and HRA
public members:
ReadData() function accepts the data values and invoke the calculate function.
DisplayData() function prints the data on the screen.


Q 2 (c) Consider the following declarations and answer the questions given below:
class vehicle
{
int wheels;
protected:
int passanger;
public:
void inputdata(int,int);
void outputdata();
};
class heavy_vehicle:protected vehicle
{
int diesel_petrol;
protected:
int load;
public:
void readdata(int,int);
void writedata();
};

class bus:private heavy_vehicle
{
char make[20];
public:
void fetchdata(char);
void displaydata();
};
(i) Name the base class and derived class of the class heavy_vehicle.
(ii) Name the data member(s) that can be accessed from function displaydata.
(iii) Name the data member(s) that can be accessed by an object of bus class.
(iv) Is the member function outputdata accessible to the objects of heavy_vehicle class?

Q 3 (a) Suppose a one dimensional array AR containing integers is arranged in ascending order. Write a user defined function in C++ to search for one integer from AR with the help of binary search method, returning an integer 0 to show absence ofthe number and integer 1 to show presence of the number in the array. The function should have three parameters: (1) an array AR (2) the number to be searched and (3) the number of elements N in the array.

Q 3 (b) An array A[10][20] is stored in the memory with each element requiring 2 bytes of storage. If the base address of array in the memory is 400, determine the location of A[8][13] when the array is stored as (1) Row major (2) Column major.

Q 3 (c) Write a user defined function in C++ to display the multiplication of row element of two dimensional array A[4][6] containing integer.

Q 3 (d) Evaluate the following postfix expression using a stack and show the contents of the stack after execution of each operation 5,11,-,6,8,+,12,*,/

Q 3 (e) Give the necessary declaration of a linked list implemented queue containing float type elements. Also write a user defined function in C++ to delete a float type number from the queue.

Q 4 (a) Differentiate between functions read() and write().

Q 4 (b) Assuming the class FLOPPYBOX, write a function in C++ to perform following:
(i) Write the objects of FLOPPYBOX to a binary file.
(ii) Reads the objects of FLOPPYBOX from binary file and display them on screen.

class FLOPPYBOX

{
int size;
char name[10];
public:
void getdata(){cin>>size;gets(name);}
void showdata(){cout<<size<<" "<<name<<endl;}
};

Q 5.(a) What is normalisation? Define second normal form.
Write SQL commands for (b) to (g) and write output for (h) on the basis of Teacher relation given below:

Relation : Teacher

No. Name Age Department Date of join Salary Sex
1 Jugal 24 Computer 10/01/97 12,000 M
2 Shamila 21 History 24/03/98 20,000 F
3 Sandeep 22 Maths 12/12/96 30,000 M
4 Sangeeta 25 History 01/07/97 40,000 F
5 Rakesh 22 Maths 05/09/97 25,000 M
6 Shyam 30 History 27/06/98 30,000 M
7 Shiv Om 34 Computer 25/02/97 21,000 F
8 shalakha 23 Maths 31/07/97 20,000 F


Q 5
(b) To show all information about the teacher of History department.


Q 5 (c) To list names of female teachers who are in Hindi department.


Q 5 (d) To list names of all teachers with their date of joining in ascending order.


Q 5(e) To display student's Name, Fee, Age, for male teachers only.


Q 5 (f) To count the number of teachers with age>23.


Q 5 (g) To insert a new row in the TEACHER table with the following data: 9, "Raja", 26, "Computer", {13/05/95}, 2300, "M"


Q 5 (h) Give the output of following SQL statements:
(i) Select COUNT(distinct department) from TEACHER;
(ii) Select MAX(Age) from TEACHER where Sex="F";
(iii) Select AVG(Fee) from TEACHER where Dateofjoin<{12/07/96};
(iv) Select SUM(Fee) from TEACHER where Dateofjoin<{12/07/96};

Q 6.(a) State the distributive law. Verify the law using truth table.


Q 6 (b) Prove x+x'y=x+y algebraically.


Q 6 (c) Write the dual of the Boolean expression (x+y).(x'+y')


Q 6 (d) Minimise F(w,x,y,z) using Karnaugh map.
F ( w,x,y,z) = S (0,4,8,12)


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


Q 6 (f) Represent the Boolean expression (x+y)(y+z)(z+x) with the help of NOR gates only.


Q 6 (g) Write sum of product form of the function F(x,y,z). The truth table representation for the function F is given below:

x
0
0
0
0
1
1
1
1
y
0
0
1
1
0
0
1
1
z
0
1
0
1
0
1
0
1
f
0
1
0
0
1
0
1
1

Q 7 (a) What is a bridge?


Q 7(b) What is the purpose of using FTP?


Q 7 (c) Give two advantages and disadvantages of following network topologies:
(i) Bus (ii) Tree


Q 7 (d) What is the difference between WAN and MAN.



 
Home | Abroad | Academics | Advice | Alumni Associations | Career Watch | Competitive Exams | Career Counseling | Distance Education | Forms | Organisations | Relax Zone | MBA | Engineering | Medical | Humanities | Sciences | Computers ICSE/ISC/CBSE | Scholarship | Loans
 
 Contact Us | Feedback | Advertise | Disclaimer | Privacy Policy
 
©2000-2001 All rights reserved "DD Web Vision Private Limited"

Site developed by