XII CS Key
XII CS Key
XII CS Key
Call by value
l
Call by reference
l
iii) iostream.h
1 e)cbse######agdac
(2 Marks for correct line of output)
1 f) iii) @@@@@@788,$$ 45
iv)@@@@788,$$$$ 45
cout<<Destination :;gets(Destination);
cout<<Distance :;cin>>Distance;
CALFUEL();
}
void FLIGHT::SHOWINFO()
{
cout<<Flight No :<<Fno<<endl;
cout<<Destination :<<Destination<<endl;
cout<<Distance :<<Distance<<endl;;
cout<<Fuel
:<<Fuel<<endl;;
}
(1 Mark for correctly declaring Data Members)
(1 Mark for correctly defining CALFUEL())
( Mark for correctly defining FEEDINFO())
( Mark for calling CALFUEL() from EEDINFO())
( Mark for correctly defining SHOWINFO())
( Mark for correct syntax of class)
2(d)
(i) None of data members are accessible from objects belonging to class
CUSTOMER.
(ii)
Enter(), Show()
(iii) Data members: Voucher_No, Sales_Date, Salary
Member function: Sales_Entry(), Sales_Details(), Enter(), Show(), Register(),
Status()
(iv)
66
( 1 Mark for each correct answer)
Note:
No marks to be given for partial answers
3(a)
3(b)
3
Given, W=2
N=40
M=30
Base(S)=5000
Row Major Formula:
Loc(S[I][J])
=Base(S)+W*(M*I+J)
Loc(S[20][10])
=5000+2*(30*20+10)
=5000+2*(600+10)
=5000+1220
=6220
(1 Mark for writing correct formula (for column major) OR substituting formula with correct
values)
(1 Mark for writing calculation step - at least one step)
(1 Mark for correct address)
3 (c )
struct NODE
{
char Name[20]; NODE
*Link;
};
class QUEUE
{
NODE *R,*F;
public: QUEUE();
void Insert(); void
Delete();
};
void QUEUE::Insert()
{
NODE *Temp; Temp=new NODE;
gets(Temp->Name);
Temp->Link=NULL;
if (Rear==NULL)
{ Rear=Temp;
Front=Temp;
}
else
{
Rear->Link=Temp;
Rear=Temp;
}
}
(1 Mark for creating a new node and assigning/entering appropriate values in it) (1 Mark for
checking if Queue is Empty)
(1 Mark for assigning Rear and Front as Temp - if Queue is Empty) (1 Mark for
eassigning Rear->Link as Front and Rear as Temp)
3(d)
void DiagSum(int A[100][100],int N)
{int SumD1=0,SumD2=0;
for (int I=0;I<N;I++)
{
SumD1+=A[I][I];SumD2+=A[N-I-1][I];
}
cout<<Sum of Diagonal 1:<<SumD1<<endl;
cout<<Sum of Diagonal 2:<<SumD2<<endl;
}
( Mark for initialization of desired variables)
( Mark for correct formation of loop)
( Mark for statement to add left diagonal elements)
3(e)
Result 500
( Mark for correctly evaluating each operator)
( Mark for the correct result)
4(a)
File.seekg(0,ios::end); //Statement 1
File.tellg();
//Statement 2
( Mark for each correct statement)
4(b)
void CountLine()
{
ifstream FIL("STORY.TXT");
int count=0;
char ch;
while (FIL)
{
FIL>>ch;
if(isupper(ch))
count++;
}
cout<<"No. of Upper case A:lphabets"<<count<<endl;
f.close();
}
( Mark for opening STORY.TXT correctly)
( Mark for initializing a counter variable as 0)
( Mark for correctly checking condition)
( Mark for correctly incrementing the counter)
4(c )
L.H.S = X+X.Y
= X.1+X.Y
= X.(1+Y)
= X.1
= X
= R.H.S
X+X.Y = X+Y
L.H.S. = X+X.Y
= (X+X).(X+Y)
= 1.(X+Y)
= X+Y
= R.H.S
(1 mark for stating the correct law)
(1 mark for the appropriate verification using algebraic method)
6(b) 2 mark for correct digital logic diagram.
6 (c ) G(x,y,z) = x.y.z+x.y.z+x.y.z+x.y.z (1 mark for correct answer)
6(d)F(U,V,W,Z)= (0,1,2,4,5,6,8,10)
Answer:
UV
WZ
U
V
WZ
WZ
UV
1
12
1
1
1
3
5
7
WZ
UV
1
13
15
9
11
1
2
14
10
F(U,V,W,Z)=UV+WZ+UZ
(1 mark for correctly drawing K-Map with 1s represented on right
places) (1 mark for minimizing each Quad)
(1 mark for writing the complete Boolean Expression)
1
7(a) Define the term Bandwidth. Give unit of Bandwidth.
Answer:
Bandwidth is the capability of a medium to transmit an amount of information
over a distance. Bandwidth of a medium is generally measured in bits per second (bps)
or more commonly in kilobits per second (kbps)
( Mark for correct definition and Mark for correct unit)
7b) Expand the following terminologies:
SIM
(ii) XML
Answer:
(i)
Subscriber Identification Module
(ii)
Extended Markup Language
1 (i)
An Internet Protocol (IP) address is a numerical identification and logical address that is
assigned to devices connected in a computer network.
An IP Address is used to uniquely identify devices on the Internet and so one can quickly know
the location of the system in the network.
( Mark for meaning of IP Address)
( Mark for mentioning the usefulness in network
security)
7e)Suggest a cable layout of connections between the buildings. 4
Layout : Since the distance between Fazz Building and Jazz Building is quite short
In both the layouts, a hub/switch each would be needed in all the buildings, to interconnect
the group of cables from the different computers in each block