{"id":47437,"date":"2024-02-09T10:08:36","date_gmt":"2024-02-09T04:38:36","guid":{"rendered":"https:\/\/www.aplustopper.com\/?p=47437"},"modified":"2024-02-09T13:16:25","modified_gmt":"2024-02-09T07:46:25","slug":"isc-class-12-computer-science-previous-year-question-papers-solved-2010","status":"publish","type":"post","link":"https:\/\/www.aplustopper.com\/isc-class-12-computer-science-previous-year-question-papers-solved-2010\/","title":{"rendered":"ISC Computer Science Question Paper 2010 Solved for Class 12"},"content":{"rendered":"
Maximum Marks: 70
\nTime allowed: 3 hours<\/p>\n
Part – I<\/strong> While answering questions in this Part, indicate briefly your working and reasoning, wherever required.<\/p>\n Question 1. Question 2. (ii) How would the complexity change if the second loop went to N instead of M? (b) (A + B) \/ (C * (D + E)) (c) B + W [(I – LBR) + M (J – LBC)] (d) Exception: It refers to some contradictory or unusal situation which can be encountered while executing a program. (e) (i) for (i = 0; i < N ; i + +) This loop gets executed N times thus take time C1 * N Question 3. (i) What will be the output of the function numbers (int n) when n = 5? [2] (i) What is the expression or statement at ?1? [1] Part – II<\/strong><\/p>\n Answer seven questions in this part, choosing three questions from Section A, two from Section B and two from Section C.<\/p>\n Section – A<\/strong> Question 4. Question 5. Output: X – Denotes eligible for Medal [1 indicates YES and 0 indicates NO in all cases] Question 6. (c) Multiplexer: It is a combinational circuit that selects binary information from one of many input lines and directs it to a single output line. Question 7. Section – B<\/strong> Question 8. Question 9. Question 10. (b) Finite recursion has the same stopping condition on which the recursive function does not call itself. Infinite recursion has no stopping condition and hence go on infinitely.<\/p>\n Section – C<\/strong> Question 11. Question 12. (b) Queue Question 13. Write a method OR an algorithm to compute and return the sum of all integers items stored in the linked list. The method declaration is specified below: (b) Big \u2018O\u2019 notation: It is used to represent the complexity of algorithms e.g. O(n), O(n log n) (c) (i) C is a parent of E ISC Computer Science Previous Year Question Paper 2010 Solved for Class 12 Maximum Marks: 70 Time allowed: 3 hours Part – I Answer all questions While answering questions in this Part, indicate briefly your working and reasoning, wherever required. Question 1. (a) If X = A’BC + AB’C + ABC + A’BC’ then find the […]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[41556],"tags":[],"yoast_head":"\n
\nAnswer all questions<\/strong><\/p>\n
\n(a) If X = A’BC + AB’C + ABC + A’BC’ then find the value of X when A = 1; B = 0; C = 1 [2]
\n(b) Verify if, P. (~ P + Q’) = (P = > Q) using truth table. [2]
\n(c) Draw the logic circuit of NOR and NAND gate only. [2]
\n(d) Convert the following function into its Canonical sum of products form: [2]
\nF(X, Y, Z) = \u03a3(0, 1, 5, 7).
\n(e) Show that dual of P’QR’ + PQ’R + P’Q’R is equal to the complement of: [2]
\nPQ’R + Q. (P’R’+PR’)
\nAnswer:
\n
\n<\/p>\n
\n(a) State the difference between an Interface and a Class. [2]
\n(b) Convert the following infix notation to postfix notation: [2]
\n(A + B) \/ C * (D + E)
\n(c) A character array B[7] [6] has a base address 1046 at 0, 0. Calculate the address at B[2] [3] if the array is stored Column Major wise. Each character requires tw o bytes of storage. [2]
\n(d) State the use of exceptional handling. Name the two types of exceptions. [2]
\n(e) (i) What is the worst-case complexity of the follow ing code segment: [2]<\/p>\nfor (int i = 0; i < N; i++)\r\n{\r\nsequence of statements\r\n}\r\nfor (int j=0 ; j < M; j++)\r\n{ sequence of statements\r\n}<\/pre>\n
\nAnswer:
\n(a) (i) Class can be extends in another class.
\n(ii) Interface is implemented in another class.<\/p>\n
\n= (AB +) \/ (C * (DE +))
\n= (AB +) \/ (CDE + *)
\n= AB + CDE + *\/<\/p>\n
\n= 1046 + 2 [(2 – 0) + 7(3 – 0)]
\n= 1046 + 2(2 + 21)
\n= 1046 + 2(23)
\n= 1046 + 46
\n= 1092<\/p>\n
\n(i) IO Exception
\n(ii) Array out of Bound Exception<\/p>\n
\nfor (i = 0; j < M ; j ++) This loop gets executed M times thus take time C2 * M
\nTotal Time = C1 * N + C2 * M = 0 (N + M)
\n(ii) It becomes = O(2N)<\/p>\n
\n(a) The following functions numbers (int) and numbers1 (int) are a part of some class. Answer the questions given below showing the dry run\/working:<\/p>\npublic void numbers (int n) \r\n{\r\nif (n > 0)\r\n{\r\nSystem.out. print(n + \" \" );\r\nnumbers (n-2);\r\nSystem.out.print(n + \" \");\r\n}\r\n}\r\npublic String numbers1 (int n)\r\n{\r\nif (n < = 0)\r\nreturn \" \";\r\nreturn numbersl(n-1) + n + \" \";\r\n}<\/pre>\n
\n(ii) What will the function numbersl (int n) return when n = 6? [2]
\n(iii) State in one line what is the function numbersl (int) doing apart from recursion? [1]
\n(b) The following function is a part of some class. It sorts the array a[ ] in ascending order using insertion sort technique. There are some places in the code marked by ?1?, ?2?, ?3?, ?4?, ?5? which must be replaced by expression \/ statement so that the function works correctly.<\/p>\nvoid insertsort (int a [ ])\r\n{\r\nint m = ?1?;\r\nint b, i, t;\r\nfor (i = ?2? ; i < m; i++) \r\n{ \r\nt = a[i]; \r\nb = i - I; \r\nwhile (?3? > = 0 && t < a [ b ])\r\n{\r\na[b+1] = a[b];\r\n?4?;\r\n}\r\n?5? = t;\r\n}\r\n}<\/pre>\n
\n(ii) What is the expression or statement at ?2? [1]
\n(iii) What is the expression or statement at ?3? [1]
\n(iv) What is the expression or statement at ?4? [1]
\n(v) What is the expression or statement at ?5? [1]
\nAnswer:
\n(a) (i) 5 3 1 1 3 5
\n(ii) \u201c1 2 3 4 5 6\u201d
\n(iii) It display all number from 1 to that number.
\n(b) (i) a length
\n(ii) 1
\n(iii) b
\n(iv) b = b – 1;
\n(v) a[b+1]<\/p>\n
\nAnswer any three questions<\/strong><\/p>\n
\n(a) Given F(P,Q,R,S) = \u03a3 (0, 2, 5, 7, 8, 10, 11, 13, 14, 15)
\n(i) Reduce the above expression by using 4 – Variable K-Map, showing the various groups (i.e., octal, quads and pairs). [4]
\n(ii) Draw the Logic gate diagram of the reduced expression using NAND gate only. [1]
\n(b) Given F(A, B, C, D) = (A + B + C + D). (A + B + C + D’). (A + B + C’ + D’). (A + B + C’ + D). (A + B’ + C + D’). (A + B’ + C’ + D’). (A’ + B + C + D). (A’ + B + C’ + D).
\n(i) Reduce the above expression by using 4 – Variable K-Map, showing the various groups (,i.e., octal, quads and pairs). [4]
\n(ii) Draw the Logic gate diagram of the reduced expression using NOR gate only. [1]
\nAnswer:
\n
\n
\n
\n
\n
\n<\/p>\n
\nA Government Institution intends to award a medal to a person who following criteria:
\nThe person should have been an Indian citizen and had lost his\/her completed 25 years of service.
\nOR
\nThe person must be an Indian citizen and has served the nation for a continuous period of 25 years or more but has not lost his\/her life in a war.
\nOR
\nThe person is not an Indian citizen but has taken an active part in activities for the upliftment of the nation.
\nThe inputs are:<\/p>\n\n\n
\n A<\/td>\n The person is\/was an Indian citizen<\/td>\n<\/tr>\n \n B<\/td>\n Has a continuous service of more than 25 years<\/td>\n<\/tr>\n \n C<\/td>\n Lost his\/her life in a war<\/td>\n<\/tr>\n \n D<\/td>\n Taken part in activities for the upliftment of the nation<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
\n(a) Draw the truth table for the inputs and outputs given above and write the POS expression for X (A, B, C, D). [5]
\n(b) Reduce X (A, B, C, D) using Karnaugh\u2019s Map. [5]
\nDraw the logic gate diagram for the reduced POS expression for X (A, B, C, D).
\nYou may use gates with two or more inputs. Assume that the variable and their complements are available as inputs.
\nAnswer:
\n
\n<\/p>\n
\n(a) What are Maxterms? Convert the following function as a product of Maxterms: [3]
\nF(P, Q, R) = (P + Q).(P’ + R)
\n(b) State whether the following expression is a Tautology or Contradiction with the help of Truth Table: [3]
\n(X\u21d4Z) . [(X\u21d2Y). (Y\u21d2Z)]
\n(c) What is Multiplexer? Draw the truth table and logic diagram of an 8 : 1 Multiplexer. [4]
\nAnswer:
\n(a) Maxterm It is a sum of all the literals (with or without the bar) within the logic system.
\nF(P, Q, R) = (P + Q). (P’ + R’)
\n= (P + Q + RR’). (P’ + QQ’ + R’)
\n= (P + Q + R).(P + Q + R’).(P’ + Q + R’) ,(P’ + Q’ + R’)
\n
\nIt is neither Tautology nor contradiction.<\/p>\n
\n
\n<\/p>\n
\n(a) Draw the circuit diagram for a 3 to 8 Decoder. [3]
\n(b) Draw the truth table for a Half Adder. Also, derive a POS expression for the Half Adder and draw its logic circuit. [3]
\n(c) Simplify the following expression and also draw the circuit\/gate for the reduced expression.
\n[Show the stepwise working along with the laws used.] [4]
\nF = X.(Y + Z.(X.Y + X.Z)’)
\nAnswer:
\n
\n
\n<\/p>\n
\nAnswer any two questions<\/strong><\/p>\n\n
\nThe coordinates of a point P on a two-dimensional plane can be represented by P(x, y) with x as the x-coordinate and y as the y-coordinate. The coordinates of the midpoint of two points P1(x1, y1) and P2(x2, y2) can be calculated as P(x, y) where: [10]
\n\\(x=\\frac{x_{1}+x_{2}}{2}, y=\\frac{y_{1}+y_{2}}{2}\\)
\nDesign a class Point with the following details:
\nClass name: Point
\nData Members\/instance variables:
\nx: stores the x-coordinate
\ny: stores the y-coordinate
\nMember functions:
\nPoint (): constructor to initialize x = 0, y = 0
\nvoid readpoint (): accepts the coordinates x and y of a point
\nPoint midpoint (Point A, Point B): calculates and returns the midpoint of the two points A and B
\nvoid displaypoint (): displays the coordinates of a point
\nSpecify the class Point giving details of the constructor (), member functions void readpoint ( ), Point midpoint (Point, Point) and void displaypoint () along with the main () function to create an object and call the functions accordingly to calculate the midpoint between any two given points.
\nAnswer:<\/p>\nimport java.io.*;\r\nclass Point\r\n{\r\nint x;\r\ninty;\r\npublic Point ()\r\n{\r\nx = 0;\r\ny = 0;\r\n}\r\npublic void read point () throws IOException\r\n{\r\nBuffered Reader br = new BufferedReader(new InputStreamReader(Systemin);\r\nSystem.out.println(\"Enter the value of x'');\r\nx = Integer.parselnt (br. readLine());\r\nSystem.out.printing'Enter the value of y \");\r\ny = Integer.parselnt(br. readLine ( ));\r\n}\r\npublic Point midpoint(Point A, Point B)\r\n{\r\nx = (A.x+B.x)\/2;\r\ny = (A.y + B.y)\/2;\r\n}\r\npublic void displaypoint()\r\n{\r\nSystem.out.println(x);\r\nSystem. out.println(y);\r\n}\r\npublic void main()\r\n{\r\nPoint obj 1 = new Point();\r\nobj1.readpoint();\r\nPoint obj 2 = new Point();\r\nobj2.readpoint();\r\nPoint obj 3 = new Point();\r\nPoint obj4 = obj3.midpoint(obj 1, obj2);\r\nobj4.displayPoint();\r\n}\r\n}<\/pre>\n
\nInput a word in uppercase and check for the position of the first occurring vowel and perform the following operation. [10]
\n(i) Words that begin with a vowel are concatenated with “Y”.
\nFor example, EUROPE becomes EUROPEY.
\n(ii) Words that contain a vowel in-between should have the first part from the position of the vowel till the end, followed by the part of the string from beginning till the position of the vowel and is concatenated by \u201cC\u201d.
\nFor example, PROJECT becomes OJECTPRC.
\n(iii) Words which do not contain a vowel are concatenated with “N”.
\nFor example, SKY becomes SKYN.
\nDesign a class Rearrange using the description of the data members and member functions given below:
\nClass name: Rearrange
\nData Members\/instance variables:
\nTxt: to store a word
\nCxt: to store the rearranged word
\nlen: to store the length of the word
\nMember functions:
\nRearrange (): constructor to initialize the instance variables
\nvoid readword (): to accept the word input in UPPER CASE
\nvoid convert (): converts the word into its changed form and stores it in string Cxt
\nvoid display(): displays the original and the changed word
\nSpecify the class Rearrange giving the details of the constructor (), void readword ( ), void convert () and void display (). Define a main () function to create an object and call the function accordingly to enable the task.
\nAnswer:<\/p>\nimport java.io.*;\r\nclass Rearrange\r\n{\r\nString Txt;\r\nString Cxt;\r\nintLen;\r\npublic Rearrange ()\r\n{\r\nTxt= \" '';\r\nCxt = '' \" ;\r\nLen = 0;\r\n}\r\npublic void readword ()\r\n{\r\nBufferedReader br = new BufferedReaderfnew InputStreamReader(Systemin)):\r\nSystem.out.println( \"Enter the String\");\r\nTxt = br. readLinef);\r\n{\r\npublic void convert))\r\n{\r\nString str1 = \" \", str 2 = \" \" ;\r\nboolean check = false;\r\nchar ch1, ch2, ch3;\r\nch1 = Txt char A+(0);\r\nif (ch1 == 'A' || ch1 == 'E' || ch1 == T || ch1 == 'O' || ch1 == 'U')\r\n{\r\nCxt = Txt + \"Y'';\r\n}\r\nelse\r\n{\r\nfor (i = 0; i < Txt. length (); i ++)\r\n{\r\nch2 = TxtcharAt (i);\r\nif(ch2 ! = 'A' || ch2 ! = 'E' || ch2 ! = 'I' || ch2 ! = 'O' || ch2 ! = 'U')\r\n{\r\nStrl = str1 + ch2;\r\n}\r\nelse\r\n{\r\ncheck = true;\r\nfor (j = i; j < Txt.length 0; j++)\r\n{ \r\nch3 = Txt.charAt (j); \r\nstr2 = str2 + ch3 ; \r\n} \r\nStr2 = Str2 + \"C\"; \r\n} \r\nCxt=Str2 + Str1; \r\n} \r\nif (found = = false) \r\n{ \r\nCxt = Txt + \"N\"; \r\n} \r\n} \r\npublic void display() \r\n{ \r\nSystem.out.println(\"The original string is\" + Txt); \r\nSystem.out.println(\" The new String is\"+ Cxt); \r\n} \r\npublic void main() \r\n{ \r\nRearrange obj = new Rearrange() \r\nobj.readword( ); \r\nobj.convert( ); \r\nobj.display(); \r\n} \r\n}<\/pre>\n
\nDesign a class Change to perform string related operations. The details of the class are given below:
\nClass name: Change
\nData Members\/instance variables:
\nstr: stores the word
\nnewstr: stores the changed word
\nlen: store the length of the word
\nMember functions:
\nChange(): default constructor
\nvoid inputword( ): to accept a word
\nchar caseconvert (char ch): converts the case of the character and returns it
\nvoid recchange (int): extracts characters using recursive technique and changes its case using caseconvert () and forms a new word
\nvoid display (): displays both the words
\n(a) Specify the class Change, giving details of the Constructor ( ), member functions void inputword (), char caseconvert (char ch), void recchange (int) and void display (). Define the main () function to create an object and call the functions accordingly to enable the above change in the given word. [8]
\n(b) Differentiate between an infinite and a finite recursion. [2]
\nAnswer:<\/p>\n(a) import java.io.*; \r\nClass change \r\n{\r\n String str; \r\nString newstr; \r\nint len; \r\npublic change() \r\n{ \r\nstr = \" \" ; \r\nnewstr = \" \"; \r\nlen = 0; \r\n}\r\n public void inputword() \r\n{ \r\nBufferedReader br = new BufferedReader (new InputStreamReader (System.in)); \r\nSystem.out.println (\"Enter the number\");\r\nStr=br.readLine(); \r\n} \r\npublic char caseconvert (char ch)\r\n { \r\nif (ch > = 'A' &&. ch<= 'Z') \r\n{ \r\nch=(char) ((int) ch + 32); \r\nreturn ch; \r\n} \r\nif (ch > = 'a' && ch < = 'z')\r\n{\r\nreturn (char) ((int) ch - 32);\r\n}\r\nif (ch = = ' ')\r\nreturn ch;\r\n}\r\npublic void recchange (int a)\r\n{\r\nif(a<0)\r\nreturn;\r\nelse\r\nrecchange (a-1);<\/pre>\n
\nAnswer any two questions<\/strong><\/p>\n\n
\nA superclass Worker has been defined to store the details of a worker. Define a subclass Wages to compute the monthly wages for the worker. The details\/specifications of both the classes are given below:
\nClass name: Worker
\nData Members\/instance variables:
\nName: to store the name of the worker
\nBasic: to store the basic pay in decimals
\nMember functions:
\nWorker (…): Parameterised constructor to assign values to the instance variables
\nvoid display (): display the worker’s details
\nClass name: Wages
\nData Members\/instance variables:
\nhrs: stores the hours worked
\nrate: stores rate per hour
\nwage: stores the overall wage of the worker
\nMember functions:
\nWages (…): Parameterised constructor to assign values to the instance variables of both the classes
\ndouble overtime (): Calculates and returns the overtime amount as (hours*rate)
\nvoid display (): Calculates the wage using the formula wage = overtime amount + Basic pay and displays it along with the other details
\nSpecify the class Worker giving details of the constructor () and void display ( ). Using the concept of inheritance, specify the class Wages giving details of constructor ( ), double-overtime () and void display (). The main () function need not be written.
\nAnswer:<\/p>\nimportjava.io.*;\r\nclass worker\r\n{\r\nString Name;\r\ndouble Basic;\r\npublic worker (String n, double b)\r\n{\r\nName = n;\r\nBasic = b;\r\n}\r\npublic void display ( )\r\n{\r\nSystem.out.println (Name);\r\nSystem.out.println (Basic);\r\n}\r\n}\r\nclass wages extends worker\r\n{\r\nint hrs, rate;\r\ndouble wage\r\npublic wage (string n, double b, int h, int r, double w)\r\n{\r\nsuper (n, b);\r\nhrs = h;\r\nrate = r;\r\nwage = w;\r\n}\r\npublic double overtime ()\r\n{\r\nreturn (hours*rate);\r\n}\r\npublic void display ( )\r\n{\r\nsuper.display ();\r\nwage = overtime () + Basic;\r\nSystem.out.prinln(wages);\r\n}\r\n}<\/pre>\n
\nDefine a class Repeat which allows the user to add elements from one end (rear) and remove elements from the other end (front) only.
\nThe following details of the class Repeat are given below:
\nClass name: Repeat
\nData Members\/instance variables:
\nst[]: an array to hold a maximum of 100 integer elements
\ncap: stores the capacity of the array
\nf: to point the index of the front
\nr: to point the index of the rear
\nMember functions:
\nRepeat (int m): constructor to initialize the data members cap = m, f = 0, r = 0 and to create the integer array
\nvoid pushvalue (int v): to add integer from the rear index if possible else display the message (\u201cOVERFLOW\u201d)
\nint popvalue (): to remove and return element from the front. If array is empty then return -9999
\nvoid disp (): Displays the elements present in the list
\n(a) Specify the class Repeat giving details of the constructor (int), member function void pushvalue (int). int popvalue () and void disp (). The main ( ) function need not be written. [8]
\n(b) What is the common name of the entity described above? [1]
\n(c) On what principle does this entity work? [1]
\nAnswer:<\/p>\nimport java.io.*;\r\nClass Repeat\r\n{\r\nintan [];\r\nint cap, f, r;\r\npublic Repeat (int m)\r\n{\r\ncap = m;\r\nf=0;\r\nr=0;\r\nan [ ] = new int[100];\r\n}\r\npublic void pushvalue (int v)\r\n{\r\nif (r = = cap)\r\n{\r\nSystemout.println (\"OVERFLOW\");\r\n}\r\nelse if (f = = 0)\r\n{\r\nf = 1;\r\n}\r\nelse\r\n{\r\nan [r++] = v;\r\n}\r\n}\r\npublic int popvalue ( )\r\n{\r\nif (f == 0)\r\n{\r\nSystem.out.println (-9999);\r\n}\r\nelseif(f=r)\r\n{\r\nf=0; r = 0;\r\n}\r\nelse\r\n{\r\nreturn (an [f++]);\r\n}\r\n}\r\npublic void display ( )\r\n{\r\nfor (i = f; i< = r; i ++)\r\nSystem.outprintln (an [ i ];\r\n}<\/pre>\n
\n(c) It works on first in first out Principle(FIFO).<\/p>\n
\n(a) A linked list is formed from the objects of the class, [4]<\/p>\nclass ListNodes\r\n{\r\nint item;\r\nListNodes next;\r\n}<\/pre>\n
\nint listsum(ListNodes start);
\n(b) What is Big \u2018O\u2019 notation? State its significance. [2]
\n(c) Answer the following from the diagram of a Binary Tree given below:
\n
\n(i) Name the parent of node E. [1]
\n(ii) Write the postorder tree traversal. [1]
\n(iii) Write the internal nodes of the tree. [1]
\n(iv) State the level of the root of the tree. [1]
\nAnswer:
\n(a) Algorithm
\nLet P be a pointer of type listNodes.<\/p>\n\n
\nSignificance: By using this notation one can compare the complexities of algorithms and can select the best algorithms under time or memory limitations.<\/p>\n
\n(ii) Postorder: FGDBHECA
\n(iii) internal nodes: A B C D E
\n(iv) level 1<\/p>\nISC Class 12 Computer Science Previous Year Question Papers<\/a><\/h4>\n","protected":false},"excerpt":{"rendered":"