0% found this document useful (0 votes)
74 views36 pages

Expected Answers

The document appears to be part of a test or exam that includes multiple choice and short answer questions related to C++ programming concepts like classes, inheritance, access specifiers (public, private, protected), constructors, and function overloading/overriding. It provides code snippets of classes to be analyzed and asks test takers to define classes, identify outputs, explain concepts, and answer other questions based on the provided code. The goal seems to be to assess understanding of object-oriented programming and C++

Uploaded by

mahima
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views36 pages

Expected Answers

The document appears to be part of a test or exam that includes multiple choice and short answer questions related to C++ programming concepts like classes, inheritance, access specifiers (public, private, protected), constructors, and function overloading/overriding. It provides code snippets of classes to be analyzed and asks test takers to define classes, identify outputs, explain concepts, and answer other questions based on the provided code. The goal seems to be to assess understanding of object-oriented programming and C++

Uploaded by

mahima
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

(g)

Name two Open Source software alongwith its application

Ans GNU: It is an Operating System composed entirely of free software


OR
Open Office: It is an open-source office productivity software suite whose
main components are for word processing, spreadsheets, presentations,
graphics, and databases
OR
GIMP(GNU Image Manipulation Program): It is a free and open 'source
software raster graphics editor
OR
Blender: It is a free and open-source 3D computer graphics software
OR
Any other correct Open Source Software with its application
(7/2 mark each for any 2 of the above mentioned or any other Open Source
software with/or without their application areas)
"Kindly read the instructions written on Page no. 1 carefully"
QUESTION PAPER CODE 91
EXPECTED ANSWERS
1

(a)

Give the difference between the type casting and automatic type conversion.
Also, give a suitable C++ code to illustrate both.

Ans

Type Casting

Automatic Type Conversion

Explicitly converting an expression


of a given type into another type is
known as type-casting.

Implicitly converting data from one data


type to another by assigning to a variable
of another type.

Example:
float f=7.9;
int c=(int)f;
Cout<<c;

Example:
Char x=' A' ;
Int c=x;
Cout<<c;

Output:

Output

65
387

( Mark for each correct explanation of Automatic Type Conversion)


and Type Casting)
( Mark for each correct example of Automatic Type Conversion and
Type Casting)
OR
(Full 2 Marks for correct example(s) demonstrating the meaning of or
difference between Automatic Type Conversion and Type Casting)
OR
(Only 1 Mark to be awarded if explanation without supporting
examples)
(b)

Which C++ header file(s) are essentially required to be included to run/execute


the following C++ source code (Note: Do not include any header file, which
is/are not required) :

void main ( )
{
char TEXT [ ] = "Something";
cout << Remaining SMS Chars : <<160-atrlen (TEXT) << endl.;
}
Ans iostream.h/iomanip.h
string.h
( Mark for writing each correct header file)
Note: Marks should not be deducted for mentioning extra header files
in addition to the ones mentioned above
(c)

Rewrite the following program after removing the syntactical errors (if any).
Underline each correction.
#include <iostream.h>
Class 1tem
{

388

long IId, Qty;


public :
void Purchase{cin>>IId>>Qty;}
void Sale ( )
{
coutsetw(5)<<IId<<"Old:"<<Qty<<endl;
cout<<''New: "<<Qtyend1;
}
} ;
void main ( )
{
Item I ;
Purchase ( ) ;
I.Sale ( ) ;
I.Sale ( )
}
Ans #include<iosteam.h>
class Item

// C Capital

{
long IId,Qty;
public:
void Purchase ( ){cin>>IId>>Qty;}
Either the statement is removed
or header file included as
#include<iomanip.h>

void Sale ( )
{

Cout<<setw(5)<<IId<<" Old: "<<Qty<<endl;


cout<<"New:"<<--Qty<<endl;

389

}
} ;
void main ( )
{
Item I;
I.Purchase( );// Object missing
I. Sale ( ) ;
I. Sale ( ) ;

// ; is missing

}
( Mark for each of any four corrections out of five corrections shown
above)
OR
(1 Mark for only identifying any four errors)
Note: Marks should not be deducted for mentioning any other error/
correction
(d)

Find the output of the following program:


#include <iostream.h>
class METRO
{
int Mno,TripNo,PassengerCount;
public:
METRO(int Tmno=l) {Mno=Tmno;TripNo=0;PassengerCount=0;}
void Trip(int PC=20) {TripNo++;PassengerCount+=PC; }
void status Show ()
{cout<<Mno<<":"<<TripNO<<":"<<PassengerCount<<endl:}
};
void main ()
390

{
METRO M(5), T;
M. Trip () ;
M. StatusShow() ;
T. StatusShow() ;
M. Status Show () ;
}
Ans (Full 3 Marks)

(2 Marks)

(2 Marks)

5:1:20

5 1 20

5:1:20 1:1:50 5:2:50

1:1:50

1 1 50

5:2:50

5 2 50

(1 Mark for each correct line of output)


OR
( Mark to be awarded for writing only two of the correct values in each
line)
Note: Deduct Mark for not writing any/all : and/or for not considering
end / at proper places
(e)

Find the output of the following program:


#include <iostream.h>
#include <ctype.h>
typedef char str80 [80] ;
void main ( )
{
char *Notes ;
str80 str="vR2GooD";
int L=6;

391

Notes=Str;
while (L>=3)
{
Str[L]=(isupper(Str[L])?tolower(Str[L]):
toupper(Str[L]));
cout<<Notes<<endl;
L--;
Notes++;
}
}
Ans Full 2 Marks

1 Marks

(1 Marks)

(1 Marks)

vR2Good

vR2Good

vR2GooD

R2GoOd

vR2GoOd

R2GooD

2GOOd

vR2GOOd

2GooD

gOOd

vR2g00d

GooD

( Mark for each correct line of Output)


Note: mark to be deducted if all the values are written in the same line
(f)

Observe the following program and find out, which output(s} out if (i) to
(iv) will not be expected from the program? What will be the minimum and the
maximum value assigned to the variable Chance?
#include <iostream.h>
#include <stdlib.h>
void main ( )
{
randomize( ) ;
int Arr[]={9,6}, N;
int Chanoe=random(2) + 10 ;

392

for (int C=0;C<2;C++)


{
N=random (2) ;
cout<<Arr [N] + Chance"#";
}
}
(i)

9#6#

(ii)

19#17#

(iii)

19#16#

(iv)

20#16#

Ans The outputs not expected from the program are (i), (ii) and (iv)
Minimum Value of Chance = 10
MaximumValue of Chance = 11
(1 Mark for writing correct option for output NOT expected)
( Mark for writing correct Minimum Value of Chance)
( Mark for writing correct Maximum Value of Chance)
2

(a)

What is the difference between the members in private visibility mode and the
members in protected visibility mode inside a class? Also, give a suitable C++
code to illustrate both.

Ans Option 1
Private Visibility

Protected Visibility

Members in private visibility mode

Members in protected visibility

are not accessible to the objects

mode of the class are accessible

of class (They are only accessible

to the member functions of the

inside the class to the member

same as well as that of its

functions of the class).

derived class

393

Example:
#include <iostream.h> #include<stdio.h>
const int Max=20;
class Hospital
Members in Private Visibility Mode, accessible
only to the member functions of same class

{
int Pno;

Members in Protected Visibility Mode, accessible


to the member functions of same class as well as
char Name [20] ; in member functions of derived class

protected:

public:
void Register () {cinPno; gets (Name) ;}
void ShowStatus () {cout<<Pno<<N&me<<WardnO<<endl ; }
} ;
Option 2:
Members are private by default inside a class
Protected visibility must be specified for a member to be declared as protected
Option 3:
No difference in accessibility of the members of the two visibility modes inside a
class without inheritance
For Option 1:
(1 Mark for correct explanation)
OR
For Option 2 and 3:
(Full 2 Marks for writing any answer conveying same meaning)
OR
(Full 2 Marks for correct explanation OR example illustrating
accessibility of Protected Member(s) inside derived class member
function(s))
394

(b)

Answer the questions (i) and (ii) after going through the following class
class Travel
{
int PlaceCode; char Place[20] ; float Charges;
public:
Travel ()

//Function 1

{
PlaceCode=l;strcpy (Place, "DELHJ:") ; Charges = 1000;
}
void TravelPlan (float C)

//Function 2

{
cout<<PlaceCode<<":"<<Place":"<<Charges<<endl;
}
~Travel ( )

//Function 3

{
Cout<<"Travel Plan Cancelled"<<endl;
}
Travel (int PC, char P[], float C)

//Function 4

{
PlaceCode=PC;strcpy(Place,P); Charges=C;
}
};
(i)

Ans (i)

In Object Oriented Programming, what are Function 1 and Function 4


combined together referred as?
Polymorphism
OR

395

Constructor Overloading
OR
Overloaded Constructor
OR
Function Overloading
OR
Overloaded Functions
OR
Default Constructor and Parameterized Constructor
(1 Mark for writing the feature name correctly)
Note:
( mark for writing only "constructor(s)")
(ii)

In Object Oriented Programming, which concept is illustrated by


Function 3? When is this function calledlinvoked?

Ans. (ii)

Destructor. It is called / Invoked when an object of the class goes out


of scope.

( Mark for writing the correct concept name)


( Mark for writing correct invocation)
Note:
(Full 1 Mark to be given if only the correct invocation is written)
(c)

Define a class RESTRA in C++ with following description :


Private Members
z

FoodCode of type int

Food of type string

FType of type string

Sticker of type string

396

A member function GetSticker () to assign the following value for Sticker


as per the given FType:

FType

Sticker

Vegetarian

GREEN

Contains Egg

YELLOW

Non-Vegetarian

RED

Public Members
z

A function GetFood () to allow user to enter values for FoodCode.


Food, FType and call function GetSticker() to assign Sticker.

A function ShowFood() to allow user to view the content of all the data
members.

Ans class RESTRA


{
int FoodCode;
char Food[20], FType [20],Sticker[20];
void GetSticker () ;
public:
void GetFood () ;
void ShowFood () ;
} ;
void RESTRA::GetSticker() {
if (strcmp (FType, "Vegetarian") ==0)
strcpy (Sticker,"GREEN") ;
else if (strcmp (FType,"Contains Egg")==O)
strcpy (Sticker, "YELLOW") ;
else if (strcmp (FType,'Non-Vegetarian")==O)
strcpy(Sticker,"RED");
397

}
void RESTRA::GetFood()
{
cin>>FoodCode;
gets (Food);
gets (FType) ;
GetSticker () ;
}
void RESTRA::ShowFood ()
{
cout<<FoodCode<<":"<<Food<<FType<<":"<<Sticker<<endl;
}
( Mark for correct syntax for class header)
(Mark for correct declaration of data members)
(1 Mark for correct definition of GetSticker())
(1 Mark for correct definition of GetFood() with proper invocation of
GetSticker() function)
(1 Mark for correct definition of ShowFood())
NOTE:

(d)

Mark to be deducted if GetSticker() is not invoked properly inside


GetFood()function

No marks to be deducted if member function definitions are written


inside the class

Answer the questions (i) to (iv) based on the following:


class COMPANY
{
char Location[20] ;
398

double Budget, Income ;


protected:
void Accounts () ;
public:
COMPANY () ;
void Register();
void Show() ;
} ;
class FACTORY:public COMPANY
{
char Location[20] ;
int Workers;
protected:
double Salary ;
void Computer() ;
public:
FACTORY () ;
void Enter () ;
void Show() ;
} ;
class SHOP:private COMPANY
{
char Location[20] ;
float Area;
double Sale;
public:

399

SHOP () ;
void Input( ) ;
void Output ( ) ;
} ;
(i)

Name the type of inheritance illustrated in the above C++ code.

Ans Hierarchical Inheritance


OR
Single Level Inheritance
(1 Mark for writjng correct answer)
(ii)

Write the name of data members, which are accessible from member
functions of class SHOP.

Ans Location, Area, Sale


(1 Mark for writing correct answer)
OR
( Mark for writing any two correct data members)
(iii)

Write the names of all the member functions, which are accessible from
objects belonging to class FACTORY.

Ans Enter ( ), FACTORY::Show ( ), Register ( ), COMPANY::Show ( )


OR
Enter ( ), Show ( ), Register ( ) // Show function may be present twice
OR
Enter, Show, Register
(1 Mark for writing correct answer)
OR
( Mark for writing any two correct member functions)
(iv)

Write the names of all the members, which are accessible from objects
of class SHOP
400

Ans Input ( ), Output ( )


(1 Mark for writing correct answer)
OR
( Mark for writing any one correct member function)
3.

(a)

Write a function SWAP2BEST (int ARR[], int Size) in C++ to modify the
content of the array in such a way that the elements, which are multiples of 10
swap with the value present in the very next position in the array.
For example:
If the content of array ARR is
90, 56, 45, 20, 34, 54
The content of array ARR should become
56, 90, 45, 34, 20, 54

Ans void SWAP2BEST(int ARR[], int Size)


{
int t;
for(int i=0;i<Size-1;i++)
{
if (ARR[i] %10=0)
{
t=ARR[i];
ARR[i]=ARR[i+1];
ARR[i+1]=t;
i++;

//Ignore if not. written

}
}
}

401

( Mark for correct loop)


(1 Mark for checking array elements which are multiples of 10)
(1 Mark for swapping the element with value in the next position)
Note:
Marks not to be deducted for running the loop till i<Size instead of i< Size-1
Marks not to be deducted for not incrementing i inside the body of the if construct
(b)

An array T[20][10] is stored in the memory along the column with each of the
elements occupying 2 bytes. Find out the memory location of T[10][5], if the
element T[2][9] is stored at the location 7600.

Ans Assuming LBR=LBC=0


W=2 bytes
Number of Rows (M) =20
Number of Co1umns(N)=10
LOC(T[I] [J]) = B +(I + J*M)*W
LOC(T[2] [9]) = B +(2+9*20)* 2
7600 = B + (182*2)
B = 7600 - 364
B = 7236
LOC (T[10] [5]) = 7236 +(10+5*20)* 2
= 7236 + (110*2)
= 7236 + 220
= 7456
OR
Assuming LBR=2, LBC=9 and B = 7600
W=2 bytes
Number of Rows (M) = 20
Number of Co1umns (N) = 10
402

LOC (T[I] [J]) = B + ((I-LBR) + (J-LBC)*M)*W


LOC (S[10] [5]) = 7600 + ((10-2) + (5-9)*20)*2
= 7600 + (8-80) * 2
= 7600 + (-72)) * 2
= 7600 - 144
= 7456
OR
Assuming LBR=LBC=l
W=2 bytes
Number of Rows (M) = 20
Number of Co1umns (N) = 10
LOC (T[I] [J]) = B +((I-LBR) + (J-LBC)*M)*W
LOC (T[2] [9]) = B +((2-1) + (9-1)*20)* 2
7600 = B + (161*2)
B = 7600 - 322
B = 7278
LOC (T[10] [5]) = 7278 +((10-1)+(5-1)*20)* 2
= 7278 + (9+80) *2)
= 7278 + 178
= 7456
(1 Mark for writing correct formula (for column major) OR
substituting formula with correct values for calculating Address)
(1 Mark for correct calculation)
(1 marks for writing correct address)
Note:
z

1 Mark to be awarded for writing only the correct answer (i.e. 7456)

403

(c)

2 Marks to be awarded if the formula and/or substitution is correct and


total number of rows is considered as 21

Do not deduct any marks, if the formula/substitution is represented in


any other eauivalent form

Write a function in C++ to perform Insert operation in a static circular Queue


containing Book's information (represented with the help of any array of
structure BOOK)
struct BOOK
{
long Accno;

//Book Accession Number

char Title [20]

//Book Title

};
Ans const int Max = 10;
void insert(Book B[], int &a, int F)
{
if ( (R+l) %Max! =F)
{
R= (R+l) %Max;
cin>>B [R] . Accno;
//cin>>B[R].Title OR cin.getline(B[R] .Title,20); OR
gets(B[R].Title) ;
}
else
cout<<"Queue Full";
}
OR
const intmax =10;

404

void insert( long newAC, char newTitle[], Book B [],int &F,int &R)
{
if ( (F = 0 && R=max-l) II (F=R+l))
cout<<"Queue Overflow";
else
{
if (R -1)
F=0; R=0;
else if (R = max-i)
R = 0;
else
R = R + 1;
B[R].Accno = newAC;//oR cin>>B[R].Accno;
strcpy(B[R].Title, newTitle);
// OR gets(B[R].Title); OR cin>>B[R].Title OR
//cin.getline(B[R].Title,20) ;
}
}
OR
Any other equivalent correct answer acceptable
(1 Mark for writing function header correctly)
(1 Mark for checking if Queue is Full)
(1 Mark for incrementing Rear)
(1 Mark for assigning Values to the Rear location of the Queue)
(d)

Write a function ALTERNATE (int A[ ] [3], int N, int M) in C++ to display


all alternate elements from two-dimensional array A (staring from A [0] [0]).

405

For example:
If the array is containing:
23

54

76

37

19

28

62

13

19

The output will be


23

76

19

62

19

Ans. void ALTERNATE (int A [] [3], int N, int M)


{
int T=0;
for (int I=0 ; I<N; I++)
for (int J=0 ; J<M ; J++)
{
if (T%2= =0)
cout<<A[I] [J]<<" ";
T++ ;
}
}
OR
void ALTERNATE (int A[] [3], int N, int M)
{
int *P=&A[O] [0] ;
for (int I=0; I<N*M ; I+=2)
{
cout<<*p<<" ";
P+=2 ;
}
}
406

OR
Any other equivalent correct answer acceptable
(1 Mark for writing Correct loops starting for location [0] [0])
( Mark for logic of checking alternate elements)
( Mark for displaying the alternate elements)
(e)

Evaluate the following POSTFIX notation. Show status of Stack after every
step of evaluation (i.e. after each operator):

True, False, NOT, AND, False, True, OR, AND


Ans Element Scanned

Stack Status

True

True

False

True, False

NOT

True, True

AND

True

False

True, False

True

True, False, True

OR

True, True

AND

True

Final Answer: True


( Mark for evaluating till NOT operator)
( Mark for evaluating till the next AND operator)
( Mark for evaluating till the next OR operator)
( Mark for evaluating till the last AND Operator and Final Answer)
Note:
(1 Mark for only writing the final answer as True without showina
the Stack Status)
4

(a)

Observe the program segment given below carefully and the questions that follow:
class Stock

407

{
int Ino, Qty ; char Item [20];
public:
void Enter() {cin>>Ino;qets(Item) ; cin>>Qty;}
void issue(int Q){Qty+=O;}
void Purchase(int Q){Q-=Q;}
int GetIno () {return Ino;}
};
void PurchaseItem(int Pino,int PQty)
{
fstream File;
File.open("STOCK.DAT", ios::binary|ios: :in|ios: :out);
Stock S;
int Success=O;
while (Success==O && File.read((char*)&S,sizeof(S)))
{
if (Pino==S. GetIno())
{
S.PurchaSe(PQ)

_________________

// Statement 1

_________________

// Statement 2

Success++;
}
}
}
if (Success=l)

408

Cout<<"Purchase Updated"<<endl;
else
Cout<<''Wronq Item No"<<endl;
File.close() ;
(i)

Write statement 1 to position the file pointer to the appropriate place so that
the data ucdation is done for the reauired item.

Ans File.seekp(File.tellg() - sizeof(Stock));


OR
File. seekp (-sizeof (Stock) ,ios::cur));
( Mark for writing Statement 1 correctly)
Note:
Seekp() and seekg() may be used interchangeably
tel/p() and tel/g() may be used interchangeably
(ii)

Write statement 2 to perform the write operation so that the updation is done
in the binary file.

Ans File.write((char*)&S,sizeof(S));
OR
File.write((char*)&S,sizeof(Stock));
( Mark for writing any of the above statements)
(b)

Write a function in C++ to read the content of a text file "DELHI.TXT' and
display all those lines on screen, which are either starting with 'D' or starting
with 'M'

Ans void DispDorM()


{
if stream File("DELHI.TXT");
char Str[80];
while(File.getline(Str,80))

409

{
if(Str[0]='D' || Str[0]='M')
coutStrendl;
}
File.close(); //Ignore
}
OR
Any other correct function definition performing the desired operation
( Mark for opening DELHI. TXT correctly)
( Mark for reading each Line (Whichever method adopted) from the file)
( Mark for checking lines starting with '0' or 'M' )
( Mark for displaying the lines)
NOTE:
Ignore case sensitivity while checking for 'D' or 'M'
(c)

Write a function in C++ to search for the details (Phone no and Calls) of
those Phones, which have more than 800 calls from a binary file "phones.dat"
Assuming that this binary file contains records/objects of class Phone, which
is defined below.
class Phone
{
char Phoneno [10] ; int Calls ;
public:
void Get 0 {gets (Phoneno) ; cin>>ea11s;)
void Bi11ing() {cout<<Phoneno<<"#"<<Ca11send1:}
int GetCa11s () {return Ca11s;}
} ;

Ans void Search ( )


{
410

Phone P;
Ignore
fstream fin;
fin. open ("phones. dat", ios: :binary| ios: :in);
whi1e (fin.read((char*) &P, sizeof (P)))
{
if(P.GetCa11s () > 800)
P.Billing () ;
}
fin.c1ose () ; // Ignore
}
OR
Any other correct function definition performing the desired operation
( Mark for declaration of object using fstream/ifstream)
( Mark for opening phones.dat correctly)
( Mark for reading record(s) from phones.dat)
( Mark for correct formation of/oop)
( Mark for checking if value returned by GetCalls ( ) > 800)
( Mark for displaying the matching record)
Note:
Marks not to be deducted for the comparison as >= 800
5

(a)

Give a suitable example of a table with sample data and illustrate Primary and
Alternate Keys in it.

Ans A table may have more than one such attribute/group of attribute that Identifies
a row/tuple uniquely, all such attribute(s} are known as Candidate Keys. Out
of the Candidate keys, one is selected as Primary Key. while the rest are the
Alternate Keys

411

(1 Mark for writing suitable example / correct definition of a table)


( Mark for correct illustration / definition of Primary Key)
( Mark for correct illustration / definition of Alternate Keys)
Consider the following tables CARDEN and CUSTOMER and answer
(b) and (c) parts of this question:
Table: CARDEN
Ccode

CarName Make

Color

Capacity

Charges

501

A-Star

Suzuki

RED

14

503

Indigo

Tata

SILVER

12

502

Innova

Tovota

WHITE

15

509

SX4

Suzuki

SILVER

14

510

C Class

Mercedes

RED

35

Table: CUSTOMER
CCode

Cname

Ccode

1001

Hemant Sahu

501

1002

Raj Lal

509

1003

Feroza Shah

503

1004

Ketan Dhal

502
412

(b)

Write SQL commands for the following statements:


(i)

To display the names of all silver colored Cars.

Ans SELECT CarName FROM CARDEN


WHER Color = SILVER';
(1 Mark for correct query)
( Mark for partially correct answer)
(ii)

To display name of car, make and capacity of cars in descending order


of their sitting capacity.

Ans SELECT CarName, Make, Capacity FROM CARDEN


ORDER BY Capacity DESC;
(1 Mark for correct query)
( Mark for partially correct answer)
(iii)

To display the highest charges at which a vehicle can be hired from


CARDEN.

Ans SELECT MAX(Charges) FROM CARDEN ;


OR
SELECT CarName, MAX (Charges) FROM CARDEN GROUP BY CarName;
(1 Marie for correct query)
( Mark for partially correct answer)
(iv)

To display the customer name and the corresponding name of the cars hired
by them.

Ans SELECT CName, CarName FROM CUSTOMER, CARDEN


WHERE CUSTOMER.Ccode = CARDEN.Ccode;
OR
SELECT CUSTOMER. CName, CARDEN. CarName FROM CUSTOMER,
CARDEN WHERE CUSTOMER.Ccode = CARDEN.Ccode;
OR

413

SELECT CName, CarName FROM CUSTOMER A, CARDEN B


WHERE A.Ccode = B.Ccode;
OR
SELECT A. CName, B. CarName FROM CUSTOMER A, CARDEN B
WHERE A.Ccode = B.Ccode;
(1 Mark for correct query)
( Mark for partially correct answer)
(c)

Give the output of the following SOL queries:


(i)

SELECT COUNT (DISTINCT Make) FROM CARDEN;

Ans COUNT (DISTINCT Make)


4
( Mark for correct output)
(ii)

SELECT MAX (Charges), MIN (Charges) FROM CARDEN;

Ans MAX (Charges)

MIN (Charges)

35

12

( Mark for correct output)


(iii)

SELECT COUNT (*), Make FROM CARDEN;

Ans (Ignoring Make for display)


COUNT (*)
5
OR
(assuming the presence of GROUP By Make)
COUNT(*)

Make

SUZUKJ:

TATA

TOYOTA

MERCEDES
414

OR
No Output
OR
Incorrect Syntax/Error/Query will not run
( Mark for writing any of the above or any answer conveying same meaning)
OR
( Mark to be awarded if any two outputs out of (i), (jj) and (iv) are correct.
(iv)

SELECT CarName FROM CARDEN WHE~ Capacity = 4;

Ans CarName
Sx4
C Class
( Mark for correct output)
(a)

Verify the following using truth table:


(i)

X,X' = 0

Ans X

X'

X . X'

6.

Verified
(1 Mark for correct verification)
OR
( Mark for any two correct columns)
(ii)

X+1=1
X

X +1

2
Verified
415

(1 Mark for correct verification)


OR
( Mark for any two correct columns)
(b)

Write the equivalent Boolean expression for the following Logic Circuit:

Ans. U. V' + U' . W'


(2 Marks for the final expression U. V' +U'.W)
OR
(1 Mark for anv one of the correct terms out of U. V' or U'.W')
(c)

F, which is represented in a truth


Write the SOP form of a Boolean function
table as follows:

Ans X'Y'Z' + X'YZ' + XY'Z' + XYZ OR F(X,Y, Z) =

(0, 2, 4, 7)

(1 Mark for the correct SOP form)


( mark for any two correct terms)
Note: Marks should not be deducted for any other variable names
416

(d)

Reduce the following Boolean Expression using K-Map:


F(A, B, C, D) =

Ans

A'B'

(2, 3, 4, 5, 6, 7, 8, 10, 11)


A'B

C'D'

C'D

AB

AB'
1

CD

CD'

C'D'

C'D

OR

A'B'
A'B

CD

CD'

AB
AB'

F(A, B, C, D) = A'B + A'C + B'C + AB'D'

( Mark for placing all 1 s at correct positions in K-Map)


( Mark for each grouping)
( Mark for writing final expression in reduced/minimal form)
Note: marks should not be deducted for any other variable names
7

(a)

What out of the following, will you use to have an audio-visual chat with an
expert sitting in a far-away place to fix-up a technical issue?
(i)

VolP

(ii)

Email

(iii)

FTP

Ans (ii)

VolP

OR
None of the Options
(1 Mark for writing correct option)
417

(b)

Name one server side scripting language and one client side scripting language.

Ans Client side scripts: Java script / VB script / Peril Tcl/Tk / REXX.
Server side scripts: JSP / ASP / PHP / CGI / Perl
( Mark for writing one correct Client side scripting language name)
( Mark for writing one correct Server side scripting language name)
(c)

Which out of the following comes under Cyber Crime?


(i)

Operating someone's Internet banking account, without his knowledge.

(ii)

Stealing a keyboard from someone's computer.

(iii)

Working on someone's computer with his/her permission.

Ans (i)

Operating someone's Internet banking account, without his knowledge.


(1 Mark for writing correct option)

(d)

Write one advantage of Bus Topology of network. Also, illustrate how 4 computers can be connected with each other using star topology of network.

Ans Cable length required for this topology is the least compared to other networks.
OR
Any other correct advantage of Bus Topology of network.
Illustration of 4 computers connected with each other using star topology of network.

( Mark for writing one correct advantage)


( Mark for drawing / writing correct illustration OR any other
diagrammatic representation for star topology)

418

(e)

Workalot Consultants are setting up a secured network for their office campus
at Gurgaon for their day-to-day office and web-based activities. They are
planning to have connectivity between 3 buildings and the head office situated
in Mumbai Answer the questions (i) to (iv) after going through the building
positions in the campus and other details, which are given below:

(i)

Suggest the most suitable place (Le. building) to house the server of
this organization. Also give a reason to justify your location.

Ans Building "RED", since it contains maximum number of computers


OR

419

Building "BLUE", since it is closest to "GREEN" and "RED"


( Mark for writing any correct place)
( Mark for correct justification)
(ii)

Suggest a cable layout of connections between the buildings inside the


campus.

Ans Gurgaon Campus

OR
Gurgaon Campus

(1 Mark for drawing /writing any valid connectivity or topology or


diagram connecting various buildings inside the campus)
NOTE: Ignore placement/order of buildings in the diagrammatic
representation
(iii)

Suggest the placement of the following devices with justification:


(1)

Switch

(2)

Repeater

420

Ans (1)

Switch:
In each of the buildings, since a network switch is a networking device
that joins multiple computers together within one local area network
(LAN).

(2)

Repeater:
For the Layout 1 drawn in (e2)- Between buildings "GREEN" and
"RED", since distance between these two buildings is greater than 70
m which will otherwise lead to loss of signal intensity for data to be
transferred.
For the Layout 2 drawn in (e2): Repeater is not needed, since distance
between both the buildings connected to "Ganga" is less than 70 m, not
leading to any signal loss
OR
Any other placement of Repeater with proper justification

( Mark for writing correct placement and/or justification of Switch)


( Mark for writing correct placement and/or justification of Repeater,
according to layout drawn for e2)
(iv)

Ans (i)

The organization is planning to provide a high speed link with its head
office situated in the MUMBAI using a wired connection. Which of the
following cable will be most suitable for this job?
(i)

Optical Fibre

(ii)

Co-axial Cable

(iii)

Ethernet Cable

Optical Fibre

(1 Mark for writing correct option)


(f)

Give one suitable example of each URL and Domain Name

Ans URL Example:

http://www.w3schools. com/htmlldefault.asp
OR
www.youtube.com
421

Domain Name Example: w3schools.com


OR
Any other correct URL and Domain Name Examples
Note: Domain names in both the examples may/may not be same
( Mark for writing any correct URL Example)
( Mark for writing any correct Domain Name Example)
(g)

Name two Proprietary softwares along with their application.

Ans Microsoft Office - For office applications


Adobe Photoshop - For design related works
Autocad - For professional Design
MAYA - For professional animations & Movie making
3D Studio - For 3 dimensional objects
Tally - For accounting
Oracle Database - For database management
( mark each for any 2 of the above mentioned or any other proprietary
software with/or without their application areas)

422

You might also like