Important Questions

CBSE Guess > Papers > Important Questions > Class XII > 2010 > Computer Science > Computer Science By Ravi Kiran

CBSE CLASS XII

If the function AllocateMarks () is supposed to Allocate Marks for the records in the file MARKS.DAT based on their value of the member TimeTaken. Write C++ statements for the statement 1 and statement 2, where, statement 1 is required to position the file write pointer to an appropriate place in the file and statement 2 is to perform the write operation with the modified record.

(b) Write afunction in C++ to print the count of the word is as an independent word in at text file DIALOGUE.TXT.
For example, if the content of the file DIALOGUE. TXT is
This is his book. Is this book good?
Then the output of the program should be

(c) Given a binary file GAME.DAT, containing records of the following structure
type 3
struct Game
{
char GameName [20];
char Participant [10] [30];
};

Write a function in C++ that would read contents from the file GAME.DAT and creates a file named BASKET.DAT copying only those records from GAME.DAT where the game name is “Basket Ball”

5. (a) Differentiate between primary key and alternate key.

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

TABLE:SENDER
SenderlD SenderName SenderAddress SenderCiry
ND01 R Jain 2, ABC Appts New Delhi
MU02 H Sinha 12, Newtown Mumbai
MU15 S Jha 27/A, Park Street Mumbai
ND50 T Prasad 122-K, SDA New Delhi

TABLE : RECIPIENT
RecID SenderlD RecName RecAddress RecCiry
KO05 ND01 R Bajpayee 5, Central Avenue Kolkata
ND08 MU02 S Mahajan 116, A Vihar New Delhi
MU19 ND01 H Singh 2A, Andheri East Mumbai
MU32 MU15 P K Swamy B5, C S Terminus Mumbai
ND48 ND50 S Tripathi 13, B1 D, Mayur Vihar New Delhi

(i) To display the names of all Senders from Mumbai

(ii) To display the RecID), SenderName, SenderAddress, RecName,
RecAddress for every Recipient

(iii) To display Recipient details in ascending order of RecName

(iv) To display number of Recipients from each city

(v) SELECT DISTINCT SenderCity FROM Sender;

(vi) SELECT A. SenderName, B.RecName FROM Sender A, Recipient B

WHERE A. SenderlD = B.SenderlD AND B.RecCity = ‘Mumbai’;

(vii) SELECT RecName, RecAddress
FROM Recipient
WHERE RecCity NOT IN (‘Mumbai’, ‘Kolkata’);

(viii) SELECT RecID, RecName
FROM Recipient
WHERE SenderID=’MU02' ORSenderID=’ND50';

6. (a) State Distributive law and verify the same using truth table.

(b) Write the equivalent Canonical Sum of Product expression for the following Product of Sum Expression
F(X,Y,Z) = p (1,3,6,7)

(c) Write the equivalent Boolean Expression for the following Logic Circuit.

(d) Reduce the following Boolean expression using K-Map F(U,V,W,Z) = S (0, 1, 2, 3, 4, 10, 11)

Paper By Mr. Ravi Kiran
Email Id : [email protected]