CBSE Computer Science sample paper2 class XII 2008

Add to Favourites
Post to:

http://www.cbseguess.com/-------------------------------------------------------------------------------------------------------www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com Sample Paper – 2008 Class – XII Subject – Computer Science CBSE Board Examination 2007-08 (Sample Paper3) Computer Science (Theory) Time allowed : 3 hrs. Maximum Marks : 70 Note: (i) All questions are compulsory. (ii) Programming Language: C++ (iii) Total Pages:10 1. (a) Name the header file to which the following belong : 1 (i) atof() (ii) strchr() (b) How does a class accomplish data abstraction and encapsulation? 2 (c) Rewrite the following program after removing the syntactical error(s) if any, underline each correction. struct emp; { int id; char name[20]; private: getemp(void); showemp(void) } main() { do { cout< #include #include void funnystr(char *s, int n = 2) { int i = n; while(i < strlen(s)) { s[i] = '-'; i = i + n; } i = 0; while(s[i] != '\0') { if(s[i] > 'A' && s[i] < 'P') s[i] = tolower(s[i]); else if(s[i] > 'a' && s[i] < 'p') { if(i % 3 == 0) s[i] = tolower(s[i-1]); else s[i] = tolower(s[i]); } i++; } } void main() { char str[] = "MiCroSoFT"; funnystr(str,3); http://www.cbseguess.com/-------------------------------------------------------------------------------------------------------www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com cout< int update1(int b3) { int temp; temp = b3 -( b3%10 + 2) return temp; } void update2(int s1,int &s2,int s3=40) { if(s1 > s2) s1 = s1 -2; else s1 = s2 -s1; if(s2 > s3) s2 = s2 -s3; else s2 = s3 -s2; s3 = update1(s3); cout<classes is one of the major properties of OOP. How is it implemented in C+++? 2 (b) Answer the questions (i) and (ii) after going through the following class: 2 class serial { int serialcode; char title[20]; float duration; int no_of_episode; public: serial() //function 1 { duration = 30; no_of_episode = 10; } serial(int d, int noe) //function 2 { duration = d; no_of_episode = noe; } serial( &s1) //function3 { } ~serial() //function 4 { cout<<”Destroying Object”<=1000 for Saving account and >=3000 for Current account. A function Display() which displays the contents of all the data members for a account. (d) Answer the questions (i) to (iv) based on the following code: 4 class livingbeing { char specification[20]; int averageage; public: void read(); void show(); }; class ape : private livingbeing { http://www.cbseguess.com/-------------------------------------------------------------------------------------------------------www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com int no_of_organs, no_of_bones; protected: int iq_level; public: void readape(); void showape(); }; class human : public ape { char race[20]; char habitation[30]; public: void readhuman(); void showhuman(); }; (i) Name the members which can be accessed from the member functions of class human. (ii) Name the members, which can be accessed by an object of class human. (iii) What will be the size of an object (in bytes) of class human. (iv) Name the class(es) that can access read() declared in livingbeing class. 3 (a) Write a function in C++ which accepts an integer 2D array, its size and row number as arguments and display the sum of particular row. 3 If 2D array is 16128415117314106213951 Row Number is 2 Then 3 + 7 + 11 + 15 = 36 Output is Sum = 36 (b) An array S[40][30] is stored in the memory along the row with each of the element occupying 2 bytes, find out the memory location for the element S[15][5], if an element S[20][10] is stored at the memory location 5500. 4 http://www.cbseguess.com/-------------------------------------------------------------------------------------------------------www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com (c) Define functions stackpush(0 to insert nodes and stackpop() to delete nodes, for a linked list implemented stack having the following structure for each node. struct ticket { long ticketno; char name[40]; ticket *next; }; class stack { ticket *top; public: stack() { top = NULL; } void stackpush(); void stackpop(); }; (d) Write a user defined function in C++ which intakes one dimensional array and size of array as argument and find sum of elements which are positive. 3 If 1D array is 10 , 2 , −3 , −4 , 5 , −16 , −17 , 23 Then positive numbers in above array is 10, 2, 5, 23 Sum = 10 + 2 + 5 + 23 = 40 Output is 40 (e) Evaluate the following Postfix expression showing the stack contents. 2 2 , 4 , * , 3 , ─ , 10 , 5 , + , /4 (a) Write a C++ statement that reads 15 bytes from 35th byte onwards from an input stream fil. 1 (b) Write a function in C++ to count the number of lines present in a “chapter.txt” file. 2 (c) Given a binary file “AMOUNT.DAT”,containing records of the given class outstand type. http://www.cbseguess.com/-------------------------------------------------------------------------------------------------------www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com class outstand 3 { int memno; int outamt; public: void getit() { cin>>memno>>outamt; } void putit() { cout< 2; 6 (a) State Involution Law and verify the same using truth table. 2 http://www.cbseguess.com/-------------------------------------------------------------------------------------------------------www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com (b) Write the Product of Sum form of the function F(x , y , z), truth table representation of F is given below: 2 (c) Write the equivalent Boolean Expression for the following Logic Circuit. 2 (d) Reduce the following Boolean Expression using K-Map 2 F(A,B,C,D) = ∑ ( 0 , 2, 4, 5, 6, 7, 8, 10, 13, 15) 7. (a) Write one advantage and disadvantage of Ring Topology. 1 (b) Expand the following terms with respect to Networking. 2 i). FDM ii). SMS iii). IMAP iv). PPP (c) Differentiate between HTML and XML? 1 X Y Z F 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 0 1 0 0 1 1 0 1 1 1 1 0 0 1 1 1 1 C A OR AND AND http://www.cbseguess.com/-------------------------------------------------------------------------------------------------------www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com (d) Standard Bank has set up its new center in India for its office and web based activities. It has five buildings as shown in the diagram below: 4 i). Suggest a possible cable layout for connecting the buildings. 1 ii). Suggest the most suitable place to install the server of this organization with a suitable reason. 1 iii). Suggest the placement of the following devices with justification. 1 a) Hub/Switch b) Modem iv) The company wants to link its head office in „A‟ building to its Office in Sydney 1 a) Which type of transmission medium is appropriate for such a link? b) What type of network this connection result into? Distance between various buildings A to B 50 Mts B to C 30 Mts C to D 30 Mts D to E 35 Mts E to C 40 Mts D to A 120 Mts D to B 45 Mts E to B 65 Mts No of computers A 55 B 180 C 60 D 55 E 70 A E D B C

Description
This content is useful for CBSE Students

Comments

Want to learn?

Sign up and browse through relevant courses.

Name:
Your Email:
Password:
Country:
Contact no:


Area code Number
Subjects you are interested in:
Word verification: (Enter the text as in image)


Sign Up Already a member? Sign In
I agree to WizIQ's User Agreement & Privacy Policy
62 Followers

Your Facebook Friends on WizIQ

Give live classes, create & sell online courses

Try it free Plans & Pricing

Connect