(Paper) Class - XII Computer Science 2008

Disclaimer: This website is NOT associated with CBSE, for official website of CBSE visit - www.cbse.gov.in

 

4. (a) Differentiate between ios::app and ios::ate file opening modes.

(b)             Write a function in C++ which will print the size of a text file “story.txt” in the form of bytes.                                                                     (2)

(c)              Write a function in C++ which will increase the qty of a particular type of item from the file “stock.dat” . Assuming that the binary file is    containing the records of following structure :                             (3)

struct Products

{

             int id;

             char Iname[30];

             int type;

             int qty;

};

Accept the item type from user whose qty has to be increased .

 

 

5.         (a)        What do you understand by Primary Key.                     (2)

 

 

(b) Consider the following tables Employee and salary. Write SQL commands for the statements (i) to (iv) and give outputs for SQL queries (v) to (viii) 
(
6)

 


Table : Employee

Eid

Name

Deptid

Qualification

Sex

1

Deepali Gupta

101

MCA

F

2

Rajat Tyagi

101

BCA

M

3

Hari Mohan

102

B.A

M

4

Harry

102

M.A

M

5

Sumit Mittal

103

B.Tech

M

6

Jyoti

101

M.Tech

F

 

Table : Salary

 

Eid

Basic

DA

HRA

Bonus

1

6000

2000

2300

200

2

2000

300

300

30

3

1000

300

300

40

4

1500

390

490

30

5

8000

900

900

80

6

10000

300

490

89

(i)                  To display the frequency of employees department wise.

(ii)                To list the names of those employees only whose name starts with ‘H’

(iii)               To add a new column in salary table . the column name is total_sal.

(iv)              To store the corresponding values in the total_sal column.

(v)                Select name from employee where eid=(select eid from salary where basic= (select max(basic) from salary));

(vi)              select max(basic) from salary where bonus >40;

(vii)             Select count(*) from employee group by sex;

(viii)           select Distinct deptid from Employee;

6. (a) State and prove the Distributive law algebraically.  (1)

(b)                           Write the equivalent POS expression of following  SOP form F (x,y,z)= (0,2,4,6) (1)


(c)   Draw the Logical circuit of the following expression with the help of NAND gate only (1)
x+yz

(d) Obtain the simplified form of a Boolean expression using K-Map.

F(a,b,c,d)=(0,1,2,3,4,7,11,12,14)     (3)

 

7.(a)What  do your understand by Hackers? (1)

(b) Differentiate between Internet & Intranet  (1)

(c) Expand the following terminology :

(i) SMS
(ii) FTP    (1)

(d) Define Repeater. (1)



Computers in each wing are networked but wings are not networked. The company has now decided to connect the wings also.

i) Suggest a most suitable cable layout & topology of the connection between the wings. [1]

ii) The company wants internet accessibility in all the wings. Suggest an economic technology  [1]

iii) Suggest the placement of the following devices with justification if the company wants minimized network traffic  :                [1]

1)Repeater

2) Hub

3) Switch

4) Bridge

iv) The company is planning to link its head office situated in India with the offices at Reliance. Suggest a way to connect it; the company does not want to compromise with the speed of connectivity. Justify your answer. [1]