Kendriya Vidyalaya Sangathan, jabalpur Region

II Pre Board Examination January 2015

Class – XII

Subject : Computer Science (083)

Time: 3.00 hrs. MM. 70 marks

Marking Scheme

This marking scheme is just for reference. Examiners are requested to consider other alternative answers also.

Q.1 / (a) #define is a pre-processor directive whereas const is a keyword.
No data type is required with #define whereas data type is must in const (except of integer type).
#define PI 3.14
const float P=3.14;
(2 mark for differences – any 2) / 2
(b) iomanip.h and math.h ( ½ mark for each header file) / 1
(c)
#include iostream.h
#inlcude <string.h>
typedef char Text[80];
void main() {
Text T = “Good Day”;
int Count = strlen(T);
cout< T <“ has “< Count < “ characters “;
}
( ½ mark for each correction) / 2
(d)
Smove@*Drruption!*
( ½ mark for each 03 correct consecutive O/P) / 3
(e) 12*
16*22*25* ( ½ mark for correct format, 1½ marks for correct O/P) / 2
(f) (ii) Ram:Kalu:Ram and (iv) Kalu:Ram:Kalu
(1 mark for each output) / 2
Q.2 / (a) It is used to copy data values of data members from one object to another.
class Work
{
int WorkId;
char WorkType;
public :
Work(Work &W) // Copy Constructor
{
WorkId = W.WorkId;
WorkType = W.WorkType;
}
};
( 1 mark for definition and 1 mark for example) / 2
(b)
i) Function 1 will be called automatically. ( 1 mark)
ii) Function 4 is copy constructor. (1 mark) / 2
(c) 1 mark for class definition and Compute().
1 mark for constructor function
1 mark for GetInfo()
1 mark for DispInfo() / 4
(d)
(i)  Multiple Inheritance.
(ii) InCourse(), InDistance(), OutDistance(), InRegular(), OutRegular()
(iii) InCourse(), OutCourse(), InRegular(), OutRegular()
(iv)  No. Because InRegular() is not a member of Distance class.
(1 mark each for each correct answer) / 4
Q.3 / (a) void REVERSE(int A[], int S) {
int i, mid, t;
mid = S/2;
for (i=0; i<mid; i++) {
t=A[i];
A[i]=A[S-1-i];
A[S-1-i]=t;
}
}
( ½ mark for function header)
( 1 ½ marks for correct logic) / 2
(b) Formula is: Add. Of A[i][j]= B + W(N(i-lr) + (j-lc))
Given W=2, N=20, M=10, Add. Of A[5][10]=4020
Answer B = 3800 and Add of A[2][5]=3890
( 1 mark for correct formula and putting values)
(1 mark for finding base address and 1 mark for finding add. Of A[2][5]) / 3
(c)
struct Student {
char Name[20];
Student *Link;
} *Front, *Rear;
void Insert(void) {
Student *N=new Student;
cout < "\nEnter name : ";
gets(N->Name);
N->Link;
if(Rear == NULL)
Front = Rear = N;
else {
Rear->Link=N;
Rear = N;
}
cout < "\nOne node inserted.";
}
( ½ mark for correct function header)
( 1 mark for checking Rear for NULL)
( 2 ½ mark for insertion of new node) / 4
(d) void UpperHalf(int A[10][10], int N) {
int i=0, j=0;
for (i=0; i<n; i++) {
for (j=0; j<n; j++)
if (j>=i)
cout < A[i][j] < " ";
cout < endl;
}
}
(1 mark for correct header)
(2 marks for correct logic) / 3
(e) Answer FALSE(1 mark for correct answer, 1 mark for stack status) / 2
Q.4 / (a)
i)  file.seekp(-sizeof(I), ios::cur); (1/2 mark)
ii)  file.write((char *)&I, sizeof(I)); (1/2 mark) / 1
(b)
void CountPrintThe(void) {
ifstream File("Poem.txt");
char c[4];
int count=0;
if(!File) {
cout < "\nError opening the file.";
exit(0);
}
while (File) {
File > c;
if (strcmpi(c, "the") == 0)
count++;
}
if (count > 0)
cout < "Total count of the is " < count;
else
cout < "Word the is not present.";
}
( 1/2 mark for correct header)
( 1/2 mark for opening and closing the file.)
( 1 mark for correct logic) / 2
(c) //Function to Read and Display members
void Search(void) {
CLUB C;
ifstream F("CLUB.DAT", ios::binary);
while(F.read((char *)&C, sizeof(C))) {
if (C.WhatType()=='L' || C.WhatType()=='M')
C.Display();
}
F.close();
}
( ½ mark for correct function header)
( ½ mark for opening and closing file)
(2 marks for correct logic) / 3
Q.5 / (a) In a relation database, an organised collection of tuples is called a database. In a database tuples or records are arranged in a tabular format having number of attributes.
Total number of tuples in a database is called Cardinality.
Total number of attributes in a database is called Degree.
COACH
PCode / Name / GCode
1 / Kamlesh Chandrakar / 1012
2 / Rajesh Singh / 1014
3 / Jyoti Yadav / 1011
Here number of attributes are 03, so Degree = 3
Here number of tuples are 03, so Cardinality = 3
(1 mark for correct definition)(1 mark for example) / 2
(b) Consider the following tables GAMES and COACH. Write SQL commands for (I) to (IV) and write output for (V)to (VIII).
GAMES
GCode / GName / ParticipantNum / PrizeMoney / ScheduleDate
1011 / Discuss Throw / 10 / 10000 / 25-Jan-2014
1012 / Shot Put / 12 / 8000 / 28-Jan-2014
1013 / High Jump / 6 / 10000 / 14-Feb-2014
1014 / Long Jump / 6 / 15000 / 08-Feb-2014
1015 / Relay 100X4 / 12 / 9000 / 26-Jan-2014
COACH
PCode / Name / GCode
1 / Kamlesh Chandrakar / 1012
2 / Rajesh Singh / 1014
3 / Jyoti Yadav / 1011
4 / Ravinder / 1012
I.  SELECT GName, GCode FROM GAMES Order By GCode DESC;
II.  SELECT SUM(PrizeMoney), ParticipantNum FROM GAMES Group By ParticipantNum;
III. SELECT * FROM GAMES WHERE ScheduleDate < ’30-JAN-2014’ Order by ParticipantName DESC;
IV. INSERT INTO GAMES VALUES (1016,”Javlin Throw” , 12, 8000, ’13/01/2014’);
V.  DISTINCT ParticipantNum
10
12
6
VI. MAX(ScheduleDate) MIN(ScheduleDate)
14-FEB-2014 25-JAN-2014
VII.  MAX(PrizeMoney)
10000
8000
10000
15000
9000
VIII.  GName Name
Discuss Throw Jyoti Yadav
Shot Put Kamlesh Chandrakar
Shot Put Ravinder
Long Jump Rajesh singh / 6
Q.6 / (a) Associative Law states:
i) X + (Y+Z) = (X+Y)+Z
ii) X.(Y.Z) = (X.Y).Z
(1 Mark for statement of law and 1 mark for prove) / 2
(b)Logic diagram of following Boolean expression:
F(A,B,C) = (A.C)’+(A.B)’+(B.C)’

(1 mark for correct sequence of variables, 1 mark for logic gates)
/ 2
(c) F(A,B,C) = A’.B’.C + A.B’.C’ + A.B’.C + A.B.C
(1 mark for correct expression) / 1
(d) / 3
Quad 1 (m0.m1.m4.m5) = P’.R’
Quad 2 (m0.m4.m8.m12) = R’.S’
Quad 3 (m0.m2.m4.m6) = P’.S’
So, F(P,Q,R,S) = P’.R’ + R’.S’ + P’.S’
( 1 mark for putting correct values)
( 2 marks for getting correct expression)
Q.7 / (a) To resolve the protocol related problems Router is preferable, because it filters the network traffic based on IP address. The IP address tells the router which LAN segment the network traffic belongs to.
(1 mark) / 1
(b) Expand followings: ( ½ mark each)
i) WiFi (Wireless Fidelity) ii) VoIP (Voice over Internet Protocol) / 1
(c) A biometric system is the most secure level of authorization. It involves unique aspects of a person’s body such as finger-prints, retinal pattern, etc. (1 marks) / 1
(d) The W3C is an industry consortium. It promotes standards for the evaluation of the web and interoperability between WWW products by producing specifications and reference S/W. It is vendor neutral and its products are freely available to all. (1 mark) / 1
(e) A Trojan Horse is code hidden in a program such as game or spredsheet that looks safe to run but has hidden side effects. (1/2 mark for definition)
A Trojan Horse generally spread through e-mail and copying the information between computers. (1/2 mark) / 1
(f) Use of Client Side Scripting: ( ½ mark)
i) To get data from user’s browser.
ii) Customizing the display of page in browser without reloading the web page.
Use of server side scripting: ( ½ mark)
i)  Password protection.
ii)  Form processing
iii)  Adding contents to the web page dynamically. / 1
(g)
(g1) Layout 1
Cable Length
(125 m)
Selected

Layout 2
Cable Length
(145 m)
(g2) Most suitable place to house the severis Admin Center because it has the maximum number of computer (or 80:20 rule).
(g3) Hub/Switch should be placed in each school.

(g4) WAN because the distance is more than 400 Kms. / 4

(1 mark each for each correct answer)