Professional Documents
Culture Documents
FirstCommonPreBoardExamination201011
ComputerScience/ScoringKey/MarkingScheme
(a)
1 mark
and <math.h>
mark
mark each
#include <iostream.h>
class MEMBER
{
int Mno;float Fees;
public:
void Register()
{cin>>Mno>>Fees;}
void Display()
{cout<<Mno<<":"<<Fees<<endl;
}
}
;
void main()
{
MEMBER M; M.Register(); M.Display();
}
( Mark each correction)
(d)
(1
121:70
122:80
123:95
Mark for each correct line of output)
(e)
5 5 10 30 120
(2 Marks for correct line of output)
(f)
(i) ABBC
(2 Marks for mentioning correct option)
2.
(a)
When a sub class inherits from more than one base class it
hybrid inheritance.
Multiple Inheritance
Hybrid inheritance
(1/2 mark
It is
into scope.
//Function 3
class PLAY
int playcode;
char
playtitle[25];
float duration;
int noofscenes;
public :
PLAY ( )
{
duration = 45;
noofscenes =
5;
}
New_play ( )
{
cin>>playcode;
cin >>
playtitle;
}
More_info(float d, int ns )
{
duration = d;
noofscenes =
ns;
}
Show_play( )
{
cout <<
playcode<<playtitle<<duration<<noofscenes;
}
~ PLAY ( )
{
cout << The play is over;
}
};
New_play
and Show_play ( ) )
(i)
(ii)
Data Members : M, U
3.
(a)
with each of the element occupying 4 bytes, find out the memory
location for the element S[20][10], if the
array is 5000.
Given
No of columns = 40
w= 4
B = 5000
Addr of ele i,j = B + w((i-ic) * c + (j-jc))
= 5000 + 4((20-0) * 40 + (10 0))
= 8240
(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)
c)
for (j=0;j<n;j++)
{
if (i==j)
sum = sum + a[i][j];
if (i+j == n)
sum = sum + a[i][j];
if ((i==j)&&(i+j==n))
common = a[i][j];
}
sum = sum common;
avg = (float) sum/(n-1);
cout << avg;
}
( Mark for correct function header)
( Mark for appropriate loop)
( Mark for correct expression for adding each diagonal
elements and finding average)
( Mark for taking care of common element)
(e)
Symbol
Stack
20 Push
20
30 Push
20
+ Pop 2
elements
50
50 Push
50 50
40 Push
50 50 40
- Pop 2
elements
50 10
Intermediate
Calculations
30
20 + 30
50 40
* Pop 2
500
50 * 10
elements
( Mark for correctly evaluating each operator)
( Mark for the correct result)
4.
(a) fin.seekp(-1*sizeof(ex),ios::cur);
fin.write((char *)&ex, sizeof(ex));
file "STORY.TXT".
void avgword()
{
ifstream fin;
int lsum =0,count=0;
float avg;
fin.open(STORY.TXT);
while (! fin.eof())
{
fin.getline(str,20,' ');
count ++;
lsum = lsum + strlen(str);
}
avg = (float)lsum/count;
cout << avg;
fin.close();
}
( Mark for opening STORY.TXT correctly)
( Mark for initializing a counter variable as 0)
( Mark for correctly reading a line from the file)
( Mark for correctly incrementing the counter)
(c)
void BookSearch()
{
fstream FIL;
FIL.open("BOOK.DAT",ios::binary|ios::in);
BOOK B;
int bn,Found=0;
cout<<"Enter Book No. to search"; cin>>bn;
while (FIL.read((char*)&S,sizeof(S)))
if (FIL.RBno()==bn)
{
S.Display();
Found++;
}
if (Found==0) cout<<"Sorry! Book not found!!!"<<endl;
FIL.close();
}
( Mark for opening BOOK.DAT correctly)
(b)
(i)
YEAR(HIRE_DATE)
= 1996;
(1 Mark for correct query)
OR
'Computer Security';
(1 Mark for correct query)
OR
( Mark for partially correct answer)
(iii)
(vi) 20000
( Mark for correct output)
(vii)
Grid Computing
Computer Security
Computer Network
C27
107
(A+B)' = A'.B'
(A+B)
(A+B)'
A'
B'
A'.B'
F(A,B,C)=(A+C)'.(A+B)'.(B+C)'
(1 Marks for the final expression )
(d)
Z)
(1 Marks for the final expression )
(d)
F(A,B,C,D)=A'C'+A'D'+B'D'
( Mark for placing all 1s at correct positions in K-Map)
( Mark for each grouping)
(1 Mark for writing final expression in reduced/minimal form)
Note: Deduct mark if wrong variable names are used
7.
(a) Appropriate comparison between Message Switching, Packet
Switching.
(1 Mark for writing Appropriate comparison between the
two switching technique)
(b)
iii) ASP and (iv) PHP are not client side scripts
1
(1 Mark for correct answer)
(c) Cyber law is term which refers to all the legal and
regulatory
RAMAN
NEHRU
GANDHI
Layout 2
TAGORE
RAMAN
NEHRU
GANDHI
Free distribution
Derived work