Sie sind auf Seite 1von 13

Examination Papers, 2000

[Comptt.]
Maximum Marks : 70
Note.

Duration : 3 Hours

All the questions are compulsory.


Programming Language : C++

1. (a) Illustrate with the help of an example the concept of overloading a function name.
(b) Name the header file, to which the following built-in functions belong :
(i) strcat()
(ii) islower()
(iii) log10()
(iv) gets()
(c) Will the following program execute successfully ? if not, state the reason(s).

2
2
2

#include<iostream.h>
void main
{
int x = 20;
do
{
switch (x%3==0)
cout >> 2*x+1 >> endl;
else
cout >> 2*x-1 >> endl;
x-=2;
}
while x>0;
}

(d) Give the output of the following program :

#include <iostream.h>
void display(double d) {
cout << "Real : " << d << endl;
}
void display(int i) {
cout << "Integer : " << i << endl;
}
void display(char Ch) {
cout << "Character : " << Ch << endl;
}
void display(char Ch[]) {
cout << "String : " << Ch << endl;
}
void main() {
double F = 3.1416;
display(A);
display(F);
display("String");
display(45);
}

(e) Give the output of he following program.

#include <iostream.h>
int max(int &x, int &y, int &z) {
if (x > y && y > z) {
y++;

Examination Paper

z++;
return x;
} else
if (y > x)
return y;
else
return z;

}
void main() {
int a = 10, b = 13, c = 8;
a = max(a, b, c);
cout << a << b << c << endl;
b = max(a, b, c);
cout << ++a << ++b << ++c << endl;
c = max(a, b, c);
cout << a++ << ++b << ++c << endl;
}

(f) Write a function SUM() in C++ with two arguments, double x and int n. The function should return a
value of type double and it should find the sum of the following series :
4
1+

x 2 x4 x6 x 8 x10
x2n
+ + + + + ..... + upto N terms
1! 2! 3! 4! 5!
n!

Ans. (a) In C++ you can declare different function with the same name. This property is called function
overloading. Function overloading implements polymorphism.
// Program using function overloading to calculate the area of rectangle, area of triangle
// using Heros formula and area of circle.
#include <iostream.h>
#include <conio.h>
#include <iomanip.h>
#include <math.h>
float area(float a, float b, float c);
float area(float l, float w);
float area(float r);
void main() {
char ch;
float len, wid, n1, n2, n3, ar;
float radius;
int choice1;
clrscr();
cout << "\n1. For area of triangle ";
cout << "\n2. For area of rectangle ";
cout << "\n3. For area of circle";
cin >> choice1;
if (choice1 == 1) {
cout << "\nEnter the three sides of triangle : ";
cin >> n1 >> n2 >> n3;
ar = area(n1, n2, n3);
cout << "\nArea of triangle is: "< < ar;
}
if (choice1 == 2) {
cout << "\nEnter the length ";
cin >> len;
cout << "\nEnter the width: ";
cin >> wid;

2 Together with Computer Science (C++) XII

cout<< "\nArea of rectangle is : " << area(len, wid);


}
if (choice1 == 3) {
cout<< "\nEnter the radius ";
cin>>radius;
cout<< "\n Area of circle "<<area(radius);
}

}
float area(float a, float b , float c) {
float s;
float a1;
s = (a + b + c) / 2;
a1 = sqrt(s * (s-a) * (s-b) * (s-c));
return(a1);
}
float area(float l, float w) {
return(l*w);
}
float area( float radius) {
return(3.14 * radius * radius);
}

(b) (i) string.h


(ii) ctype.h
(iii) math.h
(iv) stdio.h
(c) The given program does not execute successfully. Because of the following reasons :
(i) The main() function does not have beginning and closing parenthesis.
(ii) The statement else without if.
(iii) The cout statement does not support >> sign.
(iv) The while expression is not in brackets
(d) The output is :
Character : A
Real: 3.1416
String : String
Integer : 45
(e) The output is :
13138
1499
141010
(f) // Function to find the sum of the series : 1 + x^2 /1! +x^4 / 2! +............+ x^2n /n!
double SUM(double x , int n)
{
float p,f,p1;
double sum1;
int i,j;
int k = 2;
p = 1;
f = 1;
sum1 = 1;
for (i = 1;i<n;i++)
{
f = 1;
for(j=1;j<=i;j++)
f = f * j; // Calculate the factorial
p = pow(x,k); // To find the power of x
p1 = p / f;

Examination Paper

sum1 = sum1 + p1;


k = k + 2;

}
return(sum1);
}

2. (a) Differentiate between a constructor and destructor function.


2
(b) Define a class batsman with the following specifications :
4
Private members :
bcode
(4 digit code number)
bname
(20 characters)
innings, notout, runs integer type
batavg
it is calculated according to the formula : batavg = runs/(innings-notout)
calcavg()
function to compute batavg
Public members :
readdata()
function to accept values for bcode, name, innings, notout and invoke the
function calcavg()
displaydata()
function to display the data members on the screen.
You should give function definitions.
(c) Consider the following C++ declarations and answer the questions given below :
4
class ALPHA
{
int x, y;
protected:
void putvalA();
public:
void getvalA();
};
class BETA : private ALPHA
{
int m, n;
protected:
void getvalB();
public:
void putvalB();
};
class GAMMA : protected BETA
{
int a;
public:
void getdata();
void showdata();
};

(i) Write the names of member functions, which are accessible from the objects of class GAMMA.
(ii) Write names of data members, which are accessible from the member functions of class BETA.
(iii) Name the base class and derived class of class BETA.
(iv) Name the private member functions of class GAMMA.
Ans. (a) A constructor is a special initialization function that is called automatically whenever an instance of
your class is declared. The name of the constructor is same as that of class and it return no value.
Destructor function is the opposite of the constructor in the sense that it is invoked when an object
ceases to exit. It also has a same name as that of class but with a prefix ~.
The difference between the constructor, destructor and the other function is that the functions can
return a value but the constructor and destructor does not return any value.

4 Together with Computer Science (C++) XII

(b) The class is :


class batsman {
int bcode;
char bname[20];
int innings, notout, runs;
float batavg;
float totwage;
float calcavg() {
return (runs/(innings-notout));
}
public :
void readdata();
void displaydata();
};
void batsman :: readdata() {
clrscr();
cout<<"Enter the batsman code ";
cin>> bcode;
cout<<"Enter the batsman name ";
gets(bname);;
cout<<"Enter total innings ";
cin>>innings;
cout<<"Enter total notout ";
cin>>notout;
cout<<"Enter total runs ";
cin>>runs;
batavg = calcavg();
}
void worker :: displaydata() {
clrscr();
cout<<"Batsman Code "<<bcode<<endl
cout<<"Batsman Name "<<bname<<endl;
cout<<"Total innings "<<innings<<endl;
cout<<"Total notout "<<notout<<endl;
cout<<"Total runs "<<runs<<endl;
cout<<"The batting average " << batavg;
}

(c)

3. (a)
(b)

(c)

(d)

(i) getdata();
showdata();
(ii) m and n.
(iii) The base class is ALPHA and the derived class is GAMMA.
(iv) There is no private member functions of class GAMMA.
Write a C++ function to sort an array of integer using insertion sort. The function should have two
parameters: name of the array and number elements in the array.
3
P is one-dimensional array of integers arranged in ascending order. Write a C++ function to efficiently
search for a data VAL from P. If VAL is present in the array then the function should return value 1 and
0 otherwise.
3
X[1..16] [1..10] is a two dimensional array. The first element of the array is stored at location 100. Each
element of array occupies 6 bytes. Find the memory location of X[2][4] when (i) array is stored row
wise and (ii) array is stored column wise.
3
Evaluate the following postfix expression showing the status of stack after execution of each step :
10, 40, +, 8, 2, +, *, 10, -.
2

Examination Paper

(e) Give the necessary declaration for linked representation of a queue containing integers. Write a C++
function to remove an element from the queue.
4
Ans. (a) // Function to implement the insertion short
void Insert_sort(int arr[], int N) {
int x, i, j, T;
for (i = 1; i < N; i++) {
T = arr[i]; // Extracts the first element of the unsorted part
j = i - 1;
while ((T < arr[j]) && (j >= 0)) {
arr[j+1] = arr[j];
j = j - 1;
}
arr[j+1] = T;
for (x = 0; x < N; x++)
// Displays the output after every insertion
cout << arr[x] << " ";
cout << \n;
}
cout << "\nThe sorted list is ... \n";
for (i = 0; i < N; i++)
cout << arr[i] << endl;
}
(b) // Function to search a value VAL and return either 1 or 0 accordingly
int binary_search(int P[], int N, int VAL) {
int i, flag=0, first=0, last, pos=1, mid;
last = N-1;
while (first<=lat) && *flag == 0)) {
mid = (first+last)/2;
if (P[mid] == VAL)
{
pos = pos + mid;
flag
= 1;
}
else
if (P[mid] < VAL)
first = mid + 1;
else
last = mid - 1;
}
if (flag == 1)
return (1);
else
return (0);
}

(c) Given :
To find Row Major order
The formula is applied :
X[I][J] = B +w(n(I-L1) + (J-L2))
X[2][4] = 100+6*(10*(2-1) + (4-1))
= 100 + 6*(10+3)
= 100 + 6 *13
= 100 + 78
= 178

6 Together with Computer Science (C++) XII

To find Column Major order


The formula is applied
X[I][J] = B +w((I-L1) + m(J-L2))
X[2][4] = 100 +6*((2-1) + 16*(4-1))
= 100 + 6*(1 + 16 *3)
= 100 + 6 * 49
= 100 + 294
= 394
(d) The stack operation is :
Operation

Stack Status

1.
2.
3.

10
10, 40

4.
5.
6.

7.

8.
9.

Push 10
Push 40
Pop 40, Pop 10
Calculate 40+10 = 50
Push 50
Push 8
Push 2
Pop 2, Pop 8
Calculate 2 + 8 = 10
Push 10
Pop 10, Pop 50
Calculate 10 * 50= 500
Push 500
Push 10
Pop 10, Pop 500
Calculate 500 10 = 490
Push 490

50
50, 8
50, 8, 2

50, 10

500
500, 10

490

(e) // Declares a queue structure


struct node {
int data;
node *link;
};
// Function body for delete an integer from the queue
node *del_Q(node *front, int &val) {
node *temp;
clrscr();
if (front == NULL) {
cout << "Queue Empty ";
val = -1;
} else {
temp = front;
front = front->link;
val = temp->data;
temp->link = NULL;
delete temp;
}
return (front);
}

4. (a) Name two member functions common to the class ifstream and ofstream.

Examination Paper

(b) Consider the following class declaration :

class bank {
int accno;
char name[20];
float balance;
public:
void input() {
cin >> accno >> name >> balance;
}
void display() {
cout << accno << " " << name << balance << endl;
}
float getbalance() {
return balance;
}
};

Give function definitions to the following :


(i) Write a function in C++ to accept the objects of class bank from the user and write to a binary
file BANK.DAT.
(ii) Write a function in C++ to read the objects of bank from a binary file and display all the objects
on the screen where balance is more than Rs. 25,000.
Ans. (a) Member functions common to ifstream are : open() and read()
Member functions common to ofstream are : open() and write()
(b) // Program to demonstrate the file operation
# include <fstream.h>
#include <conio.h>
#include <string.h>
#include <stdio.h>
#include <process.h>
class bank {
int accno;
char name[10];
float balance;
public:
void input() {
cin >> accno >> name >> balance;
}
void display() {
cout << accno << " " << name << balance << endl;
}
float getbalance() {
return balance;
}
};
// General function to operate the class member function
void data_read();
void data_show();
int main() {
data_read();
data_show();
return 0;
}
void data_read() {
bank bnk; // Declares the bank object

8 Together with Computer Science (C++) XII

fstream bankfile;
bank.oepn("BANK.DAT", ios::app|ios::out|ios::binary); // Creates the data file
int n, i;
clrscr();
cout << "Enter how many records U want to enter ";
cin >> n;
for (i=0; i<n; i++) {
bnk.input();
bankfile,write((char *)&bnk, sizeof(bank));
}
bankfile.close();

}
void data_show() {
bank bnk; // Declares the bank object for read operation
fstream bankfile;
bankfile.open("BANK.DAT", ios::in|ios::binary);
bankfile.seekg(0, ios::beg);
if (!bankfil)
cout << "File does not exists";
while (bankfile) {
bankfile.read((char *)&bnk, sizeof(bank)); // Reads the record one-by-one
if (balance > 250000) // Checks the condition
bnk.show(); // Display the output through the member function
if (bankfile.eof()) // If there is no record, it terminates the loop
exit(0);
}
bankfile.close();
}

5. (a) Give an example of a relation which is not in second normal form along with justification.
2
Write SQL commands for (b) to (e) and write the outputs for (f) and (g) on the basis of table
EMPLOYEE :
TABLE : EMPLOYEE
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234

1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
SNO
NAME
BASIC
DEPARTMENT
DATOFAPP
AGE SEX
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1
KARAN
8000
PERSONNEL
27/03/97
35
M
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
2
DIVAKAR
9500
COMPUTER
20/01/98
34
M
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
3
DIVYA
7300
ACCOUNTS
19/02/97
34
F
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
4
ARUN
8350
PERSONNEL
01/01/95
33
M
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
5
SABINA
9500
ACCOUNTS
12/01/96
36
F
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
6
JOHN
7400
FINANCE
24/02/97
36
M
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
7
ROBERT
8250
PERSONNEL
20/02/97
39
M
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
8
RUBINA
9450
MAINTENANCE 22/02/98
37
F
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
9
VIKAS
7500
COMPUTER
13/01/94
41
M
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
10
MOHAN
9300
MAINTENANCE 19/02/98
37
M
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234
1234567890123456789012345678901212345678901234567890123456789012123456789012345678901234567890121234

(b) List the names of the employees who are more than 34 years old sorted by NAME.
1
(c) Display a report, listing NAME, BASIC, DEPARTMENT and annual salary. Annual salary equals
BASIC X 12.
1

Examination Paper

(d) To count the number of employees who are either working in PERSONNEL or COMPUTER department.
1
(e) To inset a new row in the EMPLOYEE table :
1
11, VIJAY, 9300, FINANCE, {13/07/98}, 35, M
(f) Give the output of the following SQL statement based on table EMPLOYEE :
2
(i) Select SUM(BASIC) from EMPLOYEE where DEPARTMENT = PERSONNEL;
(ii) SelectAVG(BASIC) from EMPLOYEE where SEX = F;
(iii) Select MAX(BASIC) from EMPLOYEE where DATOFAPP > {22/02/97};
(iv) Select COUNT(DISTINCT DEPARTMENT) from EMPLOYEE;
(g) Assume that there is one more table INCHARGE in the database as shown below :
2
TABLE : INCHARGE
1234567890123456789012345678901212345678901
1234567890123456789012345678901212345678901
1234567890123456789012345678901212345678901
1234567890123456789012345678901212345678901
DEPT
HEAD
1234567890123456789012345678901212345678901
1234567890123456789012345678901212345678901
1234567890123456789012345678901212345678901
1234567890123456789012345678901212345678901
PERSONNEL
RAHUL
1234567890123456789012345678901212345678901
1234567890123456789012345678901212345678901
1234567890123456789012345678901212345678901
1234567890123456789012345678901212345678901
COMPUTER
SATYAM
1234567890123456789012345678901212345678901
1234567890123456789012345678901212345678901
1234567890123456789012345678901212345678901
1234567890123456789012345678901212345678901
ACCOUNTS
NATH
1234567890123456789012345678901212345678901
1234567890123456789012345678901212345678901
1234567890123456789012345678901212345678901
1234567890123456789012345678901212345678901
FINANCE
GANESH
1234567890123456789012345678901212345678901
1234567890123456789012345678901212345678901
1234567890123456789012345678901212345678901
1234567890123456789012345678901212345678901
MAINTENANCE
JACOB
1234567890123456789012345678901212345678901
1234567890123456789012345678901212345678901

What will be the output of the following query ;


SELECT NAME, HEAD
FROM EMPLOYEE, INCHARGE
WHERE DEPARTMENT = DEPT
Ans. (a) The table given below, the relation, which is not in second normal form :

1234567890123456789012345678901212345678901234567890123456789012123456789
1234567890123456789012345678901212345678901234567890123456789012123456789
1234567890123456789012345678901212345678901234567890123456789012123456789
1234567890123456789012345678901212345678901234567890123456789012123456789
TNo# TName
TTopic
TDept
1234567890123456789012345678901212345678901234567890123456789012123456789
1234567890123456789012345678901212345678901234567890123456789012123456789
1234567890123456789012345678901212345678901234567890123456789012123456789
1234567890123456789012345678901212345678901234567890123456789012123456789
T01
Mr. Nayak
DBMS
Comp. Science
1234567890123456789012345678901212345678901234567890123456789012123456789
1234567890123456789012345678901212345678901234567890123456789012123456789
1234567890123456789012345678901212345678901234567890123456789012123456789
1234567890123456789012345678901212345678901234567890123456789012123456789
T01
Mr. Nayak
LAN
Comp. Science
1234567890123456789012345678901212345678901234567890123456789012123456789
1234567890123456789012345678901212345678901234567890123456789012123456789
1234567890123456789012345678901212345678901234567890123456789012123456789
1234567890123456789012345678901212345678901234567890123456789012123456789
T01
Mr. Nayak
Multimedia
Comp. Science
1234567890123456789012345678901212345678901234567890123456789012123456789
1234567890123456789012345678901212345678901234567890123456789012123456789
1234567890123456789012345678901212345678901234567890123456789012123456789
1234567890123456789012345678901212345678901234567890123456789012123456789
T02
Mr. Govind
Algebra
Mathematics
1234567890123456789012345678901212345678901234567890123456789012123456789
1234567890123456789012345678901212345678901234567890123456789012123456789
1234567890123456789012345678901212345678901234567890123456789012123456789
1234567890123456789012345678901212345678901234567890123456789012123456789
1234567890123456789012345678901212345678901234567890123456789012123456789
T02
Mr. Govind
3-D
Mathematics
1234567890123456789012345678901212345678901234567890123456789012123456789
1234567890123456789012345678901212345678901234567890123456789012123456789
1234567890123456789012345678901212345678901234567890123456789012123456789
1234567890123456789012345678901212345678901234567890123456789012123456789
T02
Mr. Govind
Calculus
Mathematics
1234567890123456789012345678901212345678901234567890123456789012123456789
1234567890123456789012345678901212345678901234567890123456789012123456789
1234567890123456789012345678901212345678901234567890123456789012123456789
1234567890123456789012345678901212345678901234567890123456789012123456789
T04
Ms. Meeta
Physical
Chemistry
1234567890123456789012345678901212345678901234567890123456789012123456789
1234567890123456789012345678901212345678901234567890123456789012123456789
1234567890123456789012345678901212345678901234567890123456789012123456789
1234567890123456789012345678901212345678901234567890123456789012123456789
T04
Ms. Meeta
Organic
Chemistry
1234567890123456789012345678901212345678901234567890123456789012123456789
1234567890123456789012345678901212345678901234567890123456789012123456789

(b)
(c)
(d)
(e)
(f)

The reason is that number of data values is repeated, which takes lots of space and data redundancy.
The database management system conflicts the file to operate.
SELECT NAME FROM EMPLOYEEWHEREAGE > 34 ORDER BY NAME;
SELECT NAME, BASIC, DEPARTMENT, BASIC*12 FROM EMPLOYEE;
SELECT COUNT(*) FROM EMPLOYEE
WHERE DEPARTMENT = PERSONNEL OR DEPARTMENT = COMPUTER;
INSERT INTO EMPLOYEE values (11, VIJAY, 9300, FINANCE,{13/07/98}, 35,M);
(i) 24600
(ii) 8750
(iii) 9500
(iv) 5

10 Together with Computer Science (C++) XII

(g)

Q.6. (a)
(b)
(c)
(d)
(e)
(f)

NAME
HEAD
KARAN
RAHUL
ARUN
RAHUL
ROBERT
RAHUL
DIVAKAR
SATYAM
VIKAS
SATYAM
DIVYA
NATH
SABINA
NATH
JOHN
GANESH
RUBINA
JACOB
MOHAN
JACOB
State DeMorgans Laws. Verify one of them using truth tables.
2
Prove A.B + AC = (A+C).(A+B).(B+C) algebraically.
2
Obtain a simplified form for the Boolean expression :
F(a, b, c, d) = (4, 5, 6, 7, 9, 11, 12, 13, 14, 15) using Karnaugh map method.
3
Draw the truth table for a Full-adder.
1
Draw the circuit diagram for the Boolean function F(A, B, C) = (A + B)(B + C) using NOR gates only.
1
Express in the Product of Sums form, the Boolean function F(A, B, C), the truth table for which is
given below :
1
A

Ans. (a) DeMorgans first theorem states that (X + Y)' = X'.Y'


and second theorem states that (X.Y) = X' + Y'
The truth table for second theorem is :
X

X.Y

X.Y

X+Y

(b) (A+C)(A+B)(B+C)
= (AA + AB +AC + BC) (B+C)
= (AAB + AAC + ABB + ABC + ABC + ACC + B.BC + BCC
= AB + ABC + ABC + AC + BC + BC

Examination Paper

11

= AB[1+C] +AC[B+1] + BC
= AB + AC + BC = R.H.S.
(c) F(a, b, c, d) = (4, 5, 6, 7, 9, 11, 12, 13, 14, 15)
cd
ab

00

01

00
01

11

10

11

10

1
1

1
1

F = b + ad
(d) The truth table for Full-adder is :
x

sum

carry

(e) (A + B) (B + C) is :
A
B
(A+B)(B+C)
B
C
(f)
7. (a)
(b)
(c)
(d)
Ans. (a)
(b)

F = (A + B + C)(A + B + C)(A + B + C)(A + B + C)


What are Bridges ?
1
Mention the advantages of e-mail over conventional mailing system.
1
Briefly mention two advantages and disadvantages of Ring topology in network.
2
What is the difference between MAN and LAN ?
1
A bridge is used to connect two LANs, which are physically separated but logically same.
E-Mail is the electronic mail. Electronic mail is usually used to exchange messages and data files than
conventional mailing system. Each user is assigned an electronic mailbox. Using the appropriate
command, the user can scan a list of the messages in the mailbox, display the contents of a particular
message, send a message to another user and so forth.
(c) Advantages of Ring Topology :
(i) Short cable length. In ring topology less connections are needed which increases network
reliability.
(ii) The amount of cable needed in this topology is comparable to bus and small relative to star.

12 Together with Computer Science (C++) XII

Disadvantages of Ring Topology :


(i) Node failure causes network failure : Since each node in this network connected to its neighboring
node and data is travel through each node. So, there is one traffic flow until defective node is
removed.
(d) LAN and MAN is different in their geographical area and the speed of data transfer. LAN is restricted
to one building or nearby two or three buildings but MAN can cover one metropolitan, i.e., from one
small city to one town. As with local network MANs can also depend on communications channels
of moderate to high data rates. The LAN is generally owned, used and operated by a single organization.
MANs might also be owned and operated as public utilities.

Examination Paper

13

Das könnte Ihnen auch gefallen