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 (c)
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<<ENAME<<endl; } };
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. (c) 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 (c)
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 (c)
Describe the following in brief: (i) MOSAIC (ii) Usenet
Q no. 7 (d)
What do you understand by a backbone network?
|
|