{"id":25536,"date":"2022-01-25T20:28:02","date_gmt":"2022-01-25T14:58:02","guid":{"rendered":"https:\/\/infinitylearn.com\/surge\/?p=25536"},"modified":"2024-02-02T18:50:43","modified_gmt":"2024-02-02T13:20:43","slug":"important-questions-for-class-12-computer-science-c-data-structure","status":"publish","type":"post","link":"https:\/\/infinitylearn.com\/surge\/cbse\/class-12\/computer-sciencec\/important-questions-for-data-structure\/","title":{"rendered":"CBSE Class 12 Computer Science Important Question with Solutions 2024"},"content":{"rendered":"<p><span style=\"color: #eb4924;\"><strong>Question 1: <\/strong><\/span>Write the definition of a function AddUp(int Arr[ ], int N) in C++, in which all even positions (i.e. 0,2,4 ) of the array should be added with the content of the element in the next position and odd positions (i.e. 1,3,5, ) elements should be incremented by 10. <strong>All India 2017<\/strong><br \/>\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/24481761297_3356b74139_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(194-1)\" width=\"291\" height=\"125\" \/><br \/>\n<strong>NOTE<\/strong><\/p>\n<ul>\n<li>The function should only alter the content in the same array.<\/li>\n<li>The function should not copy the altered content in another array.<\/li>\n<li>The function should not display the altered content of the array.<\/li>\n<li>Assuming, the Number of elements in the array are Even.<\/li>\n<\/ul>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void AddUp(int Arr[], int N)\r\n{\r\nfor(int i=0;i&lt;N;i++)\r\n{\r\nif(i%2==0)\r\nArr[i] += Arr[i+1]; \r\nelse\r\nArr[i] += 10;\r\n}\r\n}\r\n<strong>Also Check: <a href=\"https:\/\/infinitylearn.com\/surge\/cbse\/cbse-class-12-computer-science-syllabus\/\" target=\"_blank\" rel=\"noopener\">CBSE Class 12 Computer Science Syllabus<\/a><\/strong><\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 2: <\/strong><\/span>Write the definition of a function FixPay(float Pay[ ], int N) in C++, which should modify each element of the array Pay having N elements, as per the following rules:<br \/>\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/24481761247_fba282f4ff_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(194-2)\" width=\"382\" height=\"134\" \/><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void FixPay(float Pay[], int N)\r\n{\r\nfor(int i=0;i&lt;=N\u20141;i++)\r\n{\r\nif(Pay[i]&lt;100000)\r\nPay[i] = Pay[i]+(Pay[i]*25)\/100; \r\nelse if(Pay[i]&gt;=100000 &amp;&amp; Pay[i]&lt;200000)\r\nPay[i] = Pay[i]+(Pay[i]*20)\/100; \r\nelse\r\nPay[i] = Pay[i]+(Pay[i]*15)\/100;\r\n}\r\n}<\/pre>\n<p style=\"text-align: center;\"><strong>Also Check: <a href=\"https:\/\/infinitylearn.com\/surge\/cbse\/cbse-class-12-physical-education-syllabus\/\" target=\"_blank\" rel=\"noopener\">CBSE Class 12 Physical Education Syllabus<\/a><\/strong><\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 3: <\/strong><\/span>Write the definition of a function FixSalary(float Salary[ ], int N) in C++, which should modify each element of the array Salary having N elements, as per the following rules:<br \/>\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/24481761147_969d7fa5db_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(194-3)\" width=\"389\" height=\"133\" \/><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void FixSalary(float Salary[], int N)\r\n{\r\nfor(int i=0;i&lt;=N\u20141;i++)\r\n{\r\nif(Salary[i]&lt;100000)\r\nSalary[i]=Salary[i]+(Salary[i]*35)\/100; \r\nelse if(Salary[i]&gt;=100000 &amp;&amp; Salary[i]&lt;200000) \r\nSalary[i]=Salary[i]+(Salary[i]*30)\/100; \r\nelse\r\nSalary[i]=Salary[i]+(Salary[i]*20)\/100;\r\n}\r\n}<\/pre>\n<p style=\"text-align: center;\"><strong>Also Check: <a href=\"https:\/\/infinitylearn.com\/surge\/cbse\/cbse-class-12-physics-syllabus\/\" target=\"_blank\" rel=\"noopener\">CBSE Class 12 Physics Syllabus<\/a><\/strong><\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 4: <\/strong><\/span>Write the definition of a function Alter (int A[ ], int N) in C++, which should change all the multiples of 5 in the array to 5 and rest of the elements as 0. e.g. if an array of 10 integers is as follows:<br \/>\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/38637879864_662f7f416d_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(195-1)\" width=\"692\" height=\"132\" \/><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<br \/>\n<\/span><\/strong><\/span><\/p>\n<pre>void Alter(int A[], int N)\r\n{\r\nfor(int i=0;i&lt;10;i++)\r\n{\r\nif(A[i]%5==0)\r\nA[i]=5; \r\nelse \r\nA[i]=0;\r\n}\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 5: <\/strong><\/span>Write the definition of a function Changeant P[ ], int N) in C++, which should change all the multiples of 10 in the array to 10 and rest of the elements as 1.  <strong>All India 2015<\/strong><br \/>\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/38637879744_2238c06290_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(195-2)\" width=\"661\" height=\"166\" \/><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void Change(int P[], int N)\r\n{\r\nfor (int i=0;i&lt;N;i++)\r\n{\r\nif (P[i]%10 == 0)\r\nP[i] = 10; \r\nelse\r\nP[i] = 1;\r\n}\r\n}<\/pre>\n<p style=\"text-align: center;\"><strong>Also Check: <a href=\"https:\/\/infinitylearn.com\/surge\/cbse\/cbse-class-12-math-syllabus\/\" target=\"_blank\" rel=\"noopener\">CBSE Class 12 Math Syllabus<\/a><\/strong><\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 6: <\/strong><\/span>Write the definition of a function Modify(int A[ ], int N) in C++, which should reposition the content after swapping each adjacent pair of numbers in it.<br \/>\n[NOTE Assuming the size of array is multiple of 4]\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/38637879704_e85c5063e6_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(195-3)\" width=\"660\" height=\"157\" \/><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void Modify(int A[], int N) \r\n{\r\nfor(int i=0;i&lt;N;i++)\r\n{\r\nint temp = A[i];\r\nA[i] = A[i+2];\r\nA[i+2] = temp; \r\nif(i%4&gt;=1)\r\ni = i+2;\r\n}\r\n}<\/pre>\n<p style=\"text-align: center;\"><strong>Also Check: <a href=\"https:\/\/infinitylearn.com\/surge\/cbse\/cbse-class-12-english-syllabus\/\" target=\"_blank\" rel=\"noopener\">CBSE Class 12 English Syllabus<\/a><\/strong><\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 7: <\/strong><\/span>Write code for a function void oddEven(int S[ ], int N) in C++, to add 5 in all the odd values and 10 in all the even values of the array S.<br \/>\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/38637879614_57a74bd00d_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(195-4)\" width=\"538\" height=\"150\" \/><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void oddEven(int S[],int N)\r\n{\r\nfor(int i=0;i&lt;N;i++)\r\n{\r\nif(S[i]%2 == 0)\r\nS[i] += 10; \r\nelse\r\nS[i]+=5;\r\n}\r\n}<\/pre>\n<p style=\"text-align: center;\"><strong>Also Check: <a href=\"https:\/\/infinitylearn.com\/surge\/cbse\/cbse-class-12-biology-syllabus\/\" target=\"_blank\" rel=\"noopener\">CBSE Class 12 Biology Syllabus<\/a><\/strong><\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 8: <\/strong><\/span>Write code for a function void EvenOdd (int T [ ], int C) in C++, to add 1 in all the odd values and 2 in all the even values of the array T.<br \/>\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/38637879554_7e2a251d2a_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(195-5)\" width=\"536\" height=\"83\" \/><br \/>\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/38637879444_da8207a694_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(196-1)\" width=\"346\" height=\"91\" \/><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void EvenOdd(int T[],int C)\r\n{\r\nfor(int i=0;i&lt;C;i++)\r\n{\r\nif(T[i]%2 == 0)\r\nT[i] += 2; \r\nelse\r\nT[i] += 1;\r\n}\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 9: <\/strong><\/span>Write a function in C++ TWOTOONE( ) which accepts two array X[ ], Y[ ] and their size n as argument. Both the arrays X[ ] and Y[ ] have the same number of elements. Transfer the content from two arrays X[ ], Y[ ] to array Z[ ]. The even places (0,2,4\u2026.) of array Z[ ] should get the contents from the array X[ ] and odd places (1,3,5\u2026) of array Z[ ] should get the contents from the array Y[ ].<br \/>\n<strong>Example:<\/strong> If the X[ ] array contains 30,60,90 and the Y[ ] array contains<br \/>\n10.20.50. Then Z[ ] should contain<br \/>\n30.10.60.20.90.50. <strong>All India 2014<\/strong><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void TW0T00NE(int X[], int Y[], int n) \r\n{\r\nint Z[40], i,j=0,k=0; \r\nfor(i=0;i&lt;(n+n);i++)\r\n{\r\nif(i%2 == 0)\r\n{\r\nZ[i] = X[j]; \r\nj++;\r\n}\r\nelse\r\n{\r\nZ[i] = Y[k]; \r\nk++;\r\n}\r\n}\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 10: <\/strong><\/span>Write code for a function void Convert (int T[ ], int Num) in C++, which repositions all the elements of the array by shifting each of them one to one position before and by shifting the first element to the last position.<br \/>\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/38637879314_a65a05f726_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(196-2)\" width=\"300\" height=\"168\" \/><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void Convert(int T[], int Num)\r\n{\r\nint temp = T[0]; \r\nfor(int i=0;i&lt;(Num-1);i++)\r\n{\r\nT[i]=T[i+l];\r\n}\r\nT[i]= temp; \r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 11: <\/strong><\/span>Write code for a function void ChangeOver(int P[ ], int N) in C++, which re-positions all the elements of the array by shifting each of them to the next position and by shifting the last element to the first position.<br \/>\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/38637879434_2523b08b0b_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(196-3)\" width=\"311\" height=\"152\" \/><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void ChangeOver(int P[],int N)\r\n{\r\nint temp;\r\nfor(int i=0;i&lt;(N-1);i++)\r\n{\r\ntemp = P[N-1];\r\nP[N-1] = P[i];\r\nP[i] = temp;\r\n} \r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 12: <\/strong><\/span>Write the definition for a function void Transfer (int A[6], int B[6]) in C++, which takes two integer arrays, each containing 6 elements as parameters. The function should exchange all odd places (i.e. 3rd and 5th) of the two arrays.<br \/>\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/38637879214_43f1cca057_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(196-4)\" width=\"301\" height=\"271\" \/><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void Transfer(int A[6],int B[6]) \r\n{\r\nint i,temp;\r\nfor(i=1;i&lt;=5;i=i+2)\r\n{\r\ntemp = A[i];\r\nA[i] = B[i];\r\nB[i] = temp;\r\n}\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 13: <\/strong><\/span>Write a function SWAP2CHANGE(int p[ ], int N) in C++ to modify the content of the array in such a way that the elements, which are multiples of 10 swap with the value present in the very next position in the array.<br \/>\ne.g. If the content of array p is<br \/>\n91, 50, 54, 22, 30, 54<br \/>\nThe content of array p should become<br \/>\n91, 54, 50, 22, 54, 30<br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void SWAP2CHANGE(int p[],int N)\r\n{ \r\nint C,i;\r\nfor(i=0;i&lt;=N-2;i++)\r\n{\r\nif(p[i]%10 == 0)\r\n{\r\nC = p[i]; \r\np[i] = p[i+1];\r\np[i+1] = C; \r\ni++:\r\n}\r\n}\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 14: <\/strong><\/span>Write a function SWAP2BEST(int ARR[ ], int Size) in C++ to modify the content of the array in such a way that the elements, which are multiples of 10 swap with the value present in the very next position in the array.<br \/>\ne.g. If the contents of array ARR are<br \/>\n90, 56, 45, 20, 34, 54<br \/>\nThe contents of array should become<br \/>\n56, 90, 45, 34, 20, 54  <strong>All India 2012<br \/>\n<\/strong><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void SWAP2BEST(int ARR[], int Size) \r\n{\r\nint i,C;\r\nfor(i=0;i&lt;=Size-2;i++)\r\n{\r\nif(ARR[i]%10==0)\r\n{\r\nC=ARR[i];\r\nARR[i] = ARR[i+1];\r\nARR[i+1] = C; \r\ni++;\r\n}\r\n}\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 15: <\/strong><\/span>Write a Get2From1( ) function in C++ to transfer the content from one array ALL[ ] to two arrays Odd[ ] and Even[ ]. The Even[ ] array should contain the values from places(0, 2, 4, \u2026) of array ALL[ ] and Odd[ ] array should contain the values from odd position like (1, 3, 5, \u2026).<br \/>\ne.g. The ALL[ ] array should contain 30,10, 60, 50, 90, 80<br \/>\nIf the Even[ ] array contains 30, 60, 90<br \/>\nand the Odd[ ] array contains<br \/>\n10, 50, 80 <strong>All India 2011<br \/>\n<\/strong><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void Get2From1(int ALL[], int N)\r\n{ \r\nint p,q,i,j=0,k=0; \r\nif(N%2 == 0)\r\n{\r\np = N\/2; \r\nq = N\/2;\r\n}\r\nelse\r\n{\r\np = N\/2; \r\nq = ((N\/2)+l); \r\n}\r\nint *0dd = new int[p]; \r\nint *Even = new int[q]; \r\nfor(i=0;i&lt;(N);i++)\r\n{\r\nif(i%2 == 0)\r\nEven[j++]=ALL[i]; \r\nelse\r\nOdd[k++]=ALL[i];\r\n}\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 16: <\/strong><\/span>Write a function CHANGE( ) in C++, which accepts an array of integer and its size as parameters and divide all those array elements by 7, which are divisible by 7 and multiply other array elements by 3.<br \/>\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/25476693248_1ef2e442f0_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(197-1)\" width=\"355\" height=\"173\" \/><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void CHANGE(int A[],int N) \r\n{\r\nfor(int i=0;i&lt;N;i++)\r\nif(A[i]%7 == 0)\r\nA[i]=A[i]\/7; \r\nelse \r\n}\r\nA[i] = A[i]*3;\r\n}\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 17: <\/strong><\/span>Write a function REASSIGN( ) in C++, which accepts an array of integer and its size as parameters and divide all those array elements by 5, which are divisible by 5 and multiply other array elements by 2.<br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void REASSIGN(int A[],int N)\r\n{\r\nfor(int i=0;i&lt;N;i++)\r\n{\r\n1f(A[i]%5 == 0)\r\nA[i] = A[i]\/5; \r\nelse\r\nA[i] = A[i]*2;\r\n}\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 18: <\/strong><\/span>Write a function SORTPOINTS( ) in C++ to sort an array of structure Game in descending order points using bubble sort.<br \/>\nNOTE Assume the following definition of structure Game.<\/p>\n<pre>struct Game \r\n{\r\nlong PNo; \/\/Player Number \r\nchar PName[20]; \r\nlong Points;\r\n}<\/pre>\n<p><img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/38637880414_99990b311d_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(197-2)\" width=\"354\" height=\"167\" \/><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void SORTPOINTS(struct Game G[], int n)\r\n{\r\nint i, j; \r\nstruct Game t; \r\nfor(i=1;i&lt;n;i++)\r\n{\r\nfor(j=0;j&lt;=n-i-1;j++)\r\n{\r\nif(G[j+1].Points&gt;G[j].Points) \r\n{\r\nt = G[j];\r\nG[j] = G[j+1]:\r\nG[j+1] = t;\r\n}\r\n}\r\n}\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 19: <\/strong><\/span>Write a function SORTSCORE( ) in C++to sort an array of structure. Examinee in descending order of Score using bubble sort.<br \/>\nNOTE Assume the following definition of structure Examinee.<\/p>\n<pre>struct Examinee\r\n{\r\nlong Roll No; \r\nchar Name[20]; \r\nfloat Score;\r\n};<\/pre>\n<p><img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/24481761537_3b287161fb_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(197-3)\" width=\"359\" height=\"337\" \/><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void SORTSCORE(struct Examinee ex[],int n) \r\n{\r\nint i,j;\r\nstruct Examinee t; \r\nfor(i=1;i&lt;n;i++)\r\n{\r\nfor(j=0;j&lt;=n-i-1;j++)\r\n{ \r\nif(ex[j+1].Score&gt;ex[j].Score)\r\n{\r\nt = ex[j]; \r\nex[j] = ex[j+1]; \r\nex[j+1] = t;\r\n   }\r\n  }\r\n }\r\n}<\/pre>\n<h3 style=\"text-align: center;\"><span style=\"color: #0000ff;\">Topic \u2013 2 <\/span><br \/>\n<span style=\"color: #0000ff;\">Two-Dimensional Array<\/span><br \/>\n<span style=\"color: #0000ff;\"> 2\/3 Marks Questions<\/span><\/h3>\n<p><span style=\"color: #eb4924;\"><strong>Question 1: <\/strong><\/span>Write a definition for a function SUMMIDCOLfint MATRIX[ ][10], int N, int M) in C++, which finds the sum of the middle column\u2019s elements of the MATRIX (Assuming N represents number of rows and M represents number of columns, which is an odd integer). <strong>All India 2017<\/strong><br \/>\n<strong>Example:<\/strong> If the content of array MATRIX having N as 5 and M as 3 is as follows:<br \/>\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/38640056554_c499fe24df_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(204-1)\" width=\"133\" height=\"123\" \/><br \/>\nThe function should calculate the sum and display the following:<br \/>\nSum of Middle Column : 15<br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void SUMMIDCOL(int MATRIX[][10],int N,int M)\r\n{\r\nint j, SUM=0;\r\nj=M\/2;\r\nfor(int i=0;i&lt;N;i++)\r\nSUM += MATRIX[i][j]; \r\ncout&lt;&lt;\"SUM of Middle Column:\"&lt;&lt;SUM;\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 2: <\/strong><\/span>ARR[15][20] is a two-dimensional array, which is stored in the memory along the row with each of its elements occupying 4 bytes. Find the address of the element ARR[5][15], if the element ARR[10][5] is stored at the memory location 35000. <strong>All India 2017<br \/>\n<span style=\"color: #eb4924;\"><span style=\"color: #008000;\">\u0410nswer:<\/span><\/span><br \/>\n<\/strong><\/p>\n<pre>B = 35000, W = 4 bytes, R=15, C=20, Lr=10, Lc=5, I=5, J=15\r\nFor row-wise allocation,\r\nAddress of ARR[I][J] = B+W[C(I-Lr)+(J-Lc)]\r\nARR[5][15] = 35000+4[20(5-10)+(15-5)] \r\n= 35000+4[20(-5)+10]\r\n= 35000+4[-100+10]\r\n= 35000+4[-90]\r\n= 35000-360 \r\n= 34640<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 3: <\/strong><\/span>Write definition for a function DISPMID (int A[ ] [5], int R, int C) in C++ to display the elements of middle row and middle column from two dimensional array A having R number of rows and C number of columns.<br \/>\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/39347557381_501ee450e4_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(204-2)\" width=\"351\" height=\"199\" \/><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void DISPMID(int A[][5], int R, int C) \r\n{\r\nint i; \r\ni=R\/2;\r\nfor(int j=0;j&lt;C;j++) \r\ncout&lt;&lt;A[i][j]&lt;&lt;'\\t'; \r\ncount&lt;&lt;endl; \r\ni=C\/2;\r\nfor(j=0;j&lt;R;j++) \r\ncout&lt;&lt;A[j][i]&lt;&lt;'\\t';\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 4: <\/strong><\/span>R[10][50] is a two dimensional array, which is stored in the memory along the row with each of its element occupying 8 bytes, find the address of the element R[5][15], if the element R[8] [10] is stored at the memory location 45,000. <strong>All India 2016<br \/>\n<span style=\"color: #eb4924;\"><span style=\"color: #008000;\">\u0410nswer:<\/span><\/span><br \/>\n<\/strong><\/p>\n<pre>B = 45000, R = 10, C = 50. W = 8 bytes, Lr = 8, Lc = 10, I = 5, J = 15\r\nFor row-wise allocation,\r\nR[I][J] = B + W[C(I-Lr)+(J-Lc)]\r\nR[5][15] = 45000 + 8[50(5-8)+(15-10)]\r\n= 45000 + 8[50x(-3)+5]\r\n= 45000 + 8[-150+5]\r\n= 45000 - 1160 \r\n= 43840<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 5: <\/strong><\/span>Write definition for a function SHOWMID(int P[ ][5], int R, int C) in C++ to display the elements of middle row and middle column from a two dimensional array P having R number of rows and C number of columns, e.g. if the content of array is as follows:<br \/>\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/38640056334_cb7c4b191e_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(204-3)\" width=\"353\" height=\"86\" \/><br \/>\nThe function should display the following as output:<br \/>\n103 101 121 102 101<br \/>\n116 121 109 <strong>Delhi 2016<br \/>\n<span style=\"color: #eb4924;\"><span style=\"color: #008000;\">\u0410nswer:<\/span><\/span><br \/>\n<\/strong><\/p>\n<pre>void SHOWMID(int P[][5], int R, int C)\r\n{\r\nint i,j; \r\ni=R\/2;\r\nfor(j=0;j&lt;C;j++) \r\ncout&lt;&lt;P[i][j]&lt;&lt;'\\t';\r\nCout&lt;&lt;endl;\r\ni=C\/2;\r\nfor(j-0;j&lt;R;j++) \r\ncout&lt;&lt;P[j][i]&lt;&lt;'\\t';\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 6: <\/strong><\/span>T[20] [50] is a two dimensional array, which is stored in the memory along the row with each of its element occupying 4 bytes, find the address of the element T[15][5], if the element T[10][8] is stored at the memory location 52000. <strong>Delhi 2016<br \/>\n<span style=\"color: #eb4924;\"><span style=\"color: #008000;\">\u0410nswer:<\/span><\/span><br \/>\n<\/strong><\/p>\n<pre>B = 52000, R = 20, Ir= 10, C = 50 Ic = 8, W = 4bytes, I = 15, J = 5 \r\nFor row-wise allocation,\r\nT[I][J] = B+W[C(I-Lr)+(J-Lc)] \r\nT[15][5] = 52000 + 4[50(15-10)+(5-8)]\r\n= 52000 + 4[50x5+(-3)]\r\n= 52000 + 4[250-3]\r\n= 52000 + 4 x 247 \r\n= 52000 + 988 \r\n= 52988<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 7: <\/strong><\/span>Write definition for a function SHOWMID(int P[ ][5], int R, int C) in C++ to display the elements of first, third and fifth column ffom a two dimensional array P having R number of rows and C number of columns.<br \/>\nFor example, if the content of array is as follows:<br \/>\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/25478718038_7834a74291_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(204-4)\" width=\"328\" height=\"79\" \/><br \/>\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/25478717828_f1113502e4_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(205-1)\" width=\"343\" height=\"126\" \/><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void SHOWMID(int P[][5], int R.int C) \r\n{\r\nint i,j;\r\nfor(j=0;j&lt;C;j+=2) \r\n{\r\ncout&lt;&lt;endl;\r\nfor(i=0;i&lt;R;i++)\r\n{\r\ncout&lt;&lt;P[1][j]&lt;\" \";\r\n}\r\n}\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 8: <\/strong><\/span>Write a function REVROW (int P[ ][5], int N, int M) in C++ to display the content of a two dimensio) al array, with each row content in reverse order. <strong>All India 2015<\/strong><br \/>\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/38640056084_607d27ac73_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(205-2)\" width=\"332\" height=\"207\" \/><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void REVR0W(int P[][5], int N, int M)\r\n{\r\nfor(int i=0;i&lt;N;i++)\r\n{\r\nint x=M-1; \r\nfor(int j=0;j&lt;M;j++)\r\n{ \r\nif(J&lt;x)\r\n{\r\nint t = P[i][j];\r\nP[i][j] = P[i][x];\r\nP[i][x]= t; \r\nx--;\r\n}\r\n}\r\n}\r\nfor(i=0;i&lt;N;i++)\r\n{\r\nfor(int j=0;j&lt;M;j++)\r\ncout&lt;&lt;P[i][j]&lt;&lt;\"\"; \r\ncout&lt;&lt;endl;\r\n}\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 9: <\/strong><\/span>A two dimensional array ARR[50] [20] is stored in the memory along the row with each of its elements occupying 4 bytes. Find the address of the element ARR[30][10], if the element ARR[10][5] is stored at the memory location 15000.<br \/>\n<strong>All India 2015<br \/>\n<span style=\"color: #eb4924;\"><span style=\"color: #008000;\">\u0410nswer:<\/span><\/span><br \/>\n<\/strong><\/p>\n<pre>B = 15000, R = 50, C = 20,W = 4 bytes, Lr = 10. Lc = 5, I = 30, J = 10 \r\nFor row-wise allocation,\r\nARR[I][J] = B + W[C(I-Lr)+(J-Lc)]\r\n= 15000 + 4[20(30-10)+(10-5)]\r\n= 15000 + 4[20x20+5]\r\n= 15000 + 4[405]\r\n= 15000 + 1620 \r\n= 16620<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 10: <\/strong><\/span>Write a function REVCOL (int P[ ][5], int N, int M) in C++ to display the content of a two dimensional array, with each column content in reverse order. <strong>Delhi 2015<\/strong><br \/>\nNOTE Array may contain any number of rows.<br \/>\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/38640055974_c302bf145c_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(205-3)\" width=\"325\" height=\"176\" \/><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void REVCO(int P[][5], int N, int M)\r\n{\r\nfor(int i=0;i&lt;M;i++) \r\n{\r\nint X=N\u20141;  \r\nfor(int j=0;j&lt;N;j++)\r\n{\r\nif(j&lt;X)\r\n{\r\nint t = P[j][i];\r\nP[j][i] = P[X][i];\r\nP[X][i] = t;\r\nX--;\r\n}\r\n}\r\n}\r\nfor(i=0;i&lt;N;i++)\r\n}\r\nfor(int j=0;j&lt;M;j++) \r\ncout&lt;&lt;p[i][j]&lt;&lt;\"\"; \r\ncout&lt;&lt;endl;\r\n}\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 11:<br \/>\n<\/strong><\/span>A two dimensional array P[20][50] is stored in the memory along the row with each of its element occupying 4 bytes. Find the address of the element P[10][30], if the element P[5][5] is stored at the memory.<br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>B=15000 R=20 C=50 W=4 bytes Lr=5, Lc=5, I=10, J=30 \r\nFor row-wise allocation,\r\nP[I][J] = B + W[C(I-Lr)+(J-Lc)] P[10][30]\r\n= 15000 + 4[50(10-5)+(30-5)] \r\n= 15000 + 4[50(5)+25]\r\n= 15000 + 4[250 + 25]\r\n= 15000 + 4 x 275 \r\n= 15000 + 1100 \r\n= 16100<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 12:<br \/>\n<\/strong><\/span>Write a function ADDDIAG (int A[ ][5], int N, int M) in C++ to display sum of the content, which at the diagonals of a two dimensional array.<br \/>\n[NOTE: Assume the array to be of even dimension such as 2\u00d72,4\u00d74, 6\u00d76 etc.]\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/24483735207_a575a34c79_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(205-4)\" width=\"361\" height=\"184\" \/><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void ADDDIAG(int A[][5],int N, int M)\r\n{\r\nint sum = 0;\r\nfor(int i=0;i&lt;N;i++)\r\n{\r\nfor(int j=0;j&lt;M;j++)\r\n{\r\nif(i == j) \r\nsum = sum + A[i][j]; \r\nelse if(j == M-i-1) \r\nsum = sum + A[i][j];\r\n}\r\n}\r\ncout&lt;&lt;sum;\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 13:<br \/>\n<\/strong><\/span>Write a user-defined function SumLast3 (int A[ ][4],int N,int M) in C++ to find and display the sum of all the values, which are ending with 3 (i.e. unit place is 3).<br \/>\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/38640057684_a3fd83e652_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(205-5)\" width=\"296\" height=\"67\" \/><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void SumLast3(int A[][4],int N.int M) \r\n{\r\nint sum=0;\r\nfor(int r=0;r&lt;N;r++)\r\n{\r\nfor(int c=0;c&lt;M;c++)\r\n{\r\nint rem = A[r][c]%10; \r\nif(rem == 3) \r\nsum += A[r][c];\r\n}\r\n}\r\ncout&lt;&lt;sum; \r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 14:<br \/>\n<\/strong><\/span>Write a user-defined function AddEnd2(int A[ ] [4], int N, int M) in C++ to find and display the sum of all the values, which are ending with 2 (i.e. unit place is 2).<br \/>\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/38640057544_b0793ff6d8_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(205-6)\" width=\"302\" height=\"108\" \/><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void AddEnd2(int A[][4],int N.int M)\r\n{\r\nint sum = 0; \r\nfor(int i=0;i&lt;N;i++)\r\n{  \r\nfor(int j=0;j&lt;M;j++)\r\n{\r\nif(A[i][j]%10 == 2)\r\nsum += A[i][j];\r\n}\r\n}\r\ncout&lt;&lt;sum;\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 15:<br \/>\n<\/strong><\/span>An array T[25] [20] is stored along the row in the memory with each element requiring 2 bytes of storage. If the base address of array T is 42000, find out the location of T[10][15]. Also, find the total number of elements present in this array. <strong>Delhi 2014<br \/>\n<span style=\"color: #eb4924;\"><span style=\"color: #008000;\">\u0410nswer:<\/span><\/span><br \/>\n<\/strong><\/p>\n<pre>B = 42000 U = 2 bytes, C = 20, R = 25, Lr =0, Lc = 0, I = 10, J = 15\r\nFor row-wise allocation,\r\nAddress of\r\nT[I][J] = B + W[C(I-Lr)+(J-Lc)] \r\nT[10][15] = 42000 + 2[20(10-0)+(15-0)]\r\n= 42000 + 2[20 x 10 + 15]\r\n= 42000 + 2[200 + 15]\r\n= 42000+215x2 \r\n= 42000+430 \r\n= 42430\r\nTotal number of elements present in this array = R x C = 25x20 = 500<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 16:<br \/>\n<\/strong><\/span>An array A[20][30] is stored along the row in the memory with each element requiring 4 bytes of storage. If the base address of array A is 32000, find out the location of A[15][10]. Also, find the total number of elements present in this array. <strong>All India 2014<br \/>\n<span style=\"color: #eb4924;\"><span style=\"color: #008000;\">\u0410nswer:<\/span><\/span><br \/>\n<\/strong><\/p>\n<pre>B = 32000, W = 4 bytes, R = 20, C = 30, Lr = 0 Lc = 0, I = 15, J = 10 \r\nFor row-wise allocation,\r\nAddress of\r\nA[I][J] = B + W[C(I-Lr)+(J-Lc)]\r\nA[15][10] = 32000 + 4[30(15-0)+(10-0)] \r\n= 32000+C(15x301+10] x 4 \r\n= 32000 + [460 x 4]\r\n= 32000+1840\r\n= 33840 \r\nTotal number of elements present in this array = R x C = 20 x 30 = 600<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 17:<br \/>\n<\/strong><\/span>Write a function in C++ which accepts a 2D array of integers and its size arguments and displays the elements which lie on minor diagonal. [Top right to bottom left diagonal]\n[Assuming the 2D array to be square matrix with odd dimension i.e. 3\u00d73, 5\u00d75, 7\u00d77, etc\u2026.] <strong>All India (C) 2014<\/strong><br \/>\nFor example,<br \/>\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/38640057404_53d5d7557f_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(206-1)\" width=\"286\" height=\"200\" \/><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void MinorDiagonal(int A[][10], int M, int N)\r\n{\r\nfor(int i=0;i&lt;M;i++)\r\n{\r\nfor(int j=0;j&lt;N;j++)\r\n{\r\nif(j==N\u2014i\u20141)\r\n{\r\ncout&lt;&lt;A[i][j]&lt;&lt;endl;\r\n}\r\n}\r\n}\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 18:<br \/>\n<\/strong><\/span>Write a user-defined function DispTen(int A[ ][4], int N, int M) in C++ to find and display all the numbers, which are divisible by 10.<br \/>\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/25478719838_967ec5262e_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(206-2)\" width=\"266\" height=\"126\" \/><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void DispTen(int A[][4], int N, int M) \r\n{\r\nint i,j;\r\nfor(i=0;i&lt;N;i++) \r\nfor(j=0;j&lt;M;j++)\r\nif(A[i][j]%10 == 0)\r\ncout&lt;&lt;A[i][j]&lt;&lt;\" \";\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 19:<br \/>\n<\/strong><\/span>Write a user-defined function DispNTen(int L[ ][4], int R, int C) in C++ to find and display all the numbers, which are not divisible by 10.<br \/>\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/39347557651_74b5952bba_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(206-3)\" width=\"258\" height=\"126\" \/><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void DispNTen(int L[][4],int R,int C) \r\n{\r\nint i,j;\r\nfor(i=0;i&lt;R;i++) \r\nfor(j=0;j&lt;C;j++) \r\nif(L[i][j]%10 != 0) \r\ncout&lt;&lt;L[i][j]&lt;&lt;\" \"; \r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 20:<br \/>\n<\/strong><\/span>Write a user-defined function int SumSingle(int A[4] [4]) in C++, which finds and returns the sum of all numbers present in the first row of the array.<br \/>\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/39347557611_55bbfd6eaa_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(206-4)\" width=\"241\" height=\"107\" \/><br \/>\nThen, the function should return 33.<br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>int SumSingle(int A[4][4])\r\n{\r\nint Sum = 0; \r\nfor(int j=0;j&lt;=3;j++)\r\n{\r\nSum = Sum + A[0][j];\r\n}\r\nreturn Sum;\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 21:<br \/>\n<\/strong><\/span>An array P[15][10] is stored along the column in the memory with each element requiring 4 bytes of storage. If the base address of array P is 14000, find out the location of P[8][5]. <strong>Delhi 2013<br \/>\n<span style=\"color: #eb4924;\"><span style=\"color: #008000;\">\u0410nswer:<\/span><\/span><\/strong><\/p>\n<pre>B = 14000, W = 4 bytes, R = 15, C = 10, Lr=0, Lc =0 I = 8, J = 5\r\nFor column-wise allocation,\r\nAddress of\r\nP[I][J] = B + W[(I-Lr)+(J-Lc)R]\r\nP[8][5] = 14000 + 4[18-0)+(5-0)15]\r\n= 14000 + 4[8 + (5)15]\r\n= 14000 + 4[8 + 75]\r\n= 14000 + 4[83]\r\n= 14000 + 332 \r\n= 14332<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 22:<br \/>\n<\/strong><\/span>An array T[15][10] is stored along the row in the memory with each element requiring 8 bytes of storage. If the base address of array T is 14000, find out the location of T[10][7]. <strong>All India 2013<br \/>\n<span style=\"color: #eb4924;\"><span style=\"color: #008000;\">\u0410nswer:<\/span><\/span><br \/>\n<\/strong><\/p>\n<pre>B = 14000, W = 8 bytes, R = 15, C = 10, Lr = 0, Lc = 0, I = 10, J = 7 \r\nFor row-wise allocation,\r\nAddress of\r\nT[I][J] = B + W[C(I-Lr)+(J-Lc)] \r\nT[10][7] = 14000 + 8[10(10-0)+(7-0)] \r\n= 14000+8[10(10) + 7]\r\n= 14000+8[100 + 7]\r\n= 14000+8[107]\r\n= 14000+856 = 14856<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 23:<br \/>\n<\/strong><\/span>An array S[10] [15] is stored in the memory with each element requiring 2 bytes of storage. If the base address of array S is 25000, determine the location of S[5][10] if the array is S stored along the column. <strong>Delhi (C) 2013<br \/>\n<span style=\"color: #eb4924;\"><span style=\"color: #008000;\">\u0410nswer:<\/span><\/span><br \/>\n<\/strong><\/p>\n<pre>B = 25000, W = 2 bytes, R = 10, C = 15, Lr = 0, Lc=0, I = 5, J = 10 \r\nFor column-wise allocation.\r\nAddress of\r\nS[I][J] = B + W[(I-Lr)+R(J-Lc)]\r\nS[5][10] = 25000 + 2[(5-0)+1000-0)] \r\n= 25000 + 2[(5)+(10)10]\r\n = 25000 + 2[5+100]\r\n = 25000 + 2[105] \r\n= 25000 + 210 \r\nS[5][10] = 25210<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 24:<br \/>\n<\/strong><\/span>Write a function SKIPEACH(int H[ ] [3], int C, int R) in C++ to display all alternate elements from two-dimensional array H (starting from H[0][0]).<br \/>\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/25478719398_bca6755fea_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(206-5)\" width=\"277\" height=\"160\" \/><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void SKIPEACH(int H[][3],int C,int R) \r\n{\r\nint i,j;\r\nfor(i=0;i&lt;=R-1;i++)\r\n{\r\nif(i%2==0)\r\n{\r\nj=0;\r\n}\r\nelse\r\n{\r\n j=l:\r\n}\r\nwhi1e(j&lt;=C-1)\r\n{\r\ncout&lt;&lt;H[i][j]&lt;&lt;\" \"; \r\nj = j+2;\r\n}\r\n}\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 25:<br \/>\n<\/strong><\/span>Write a function ALTERNATE(int A[ ] [3], int N, int M) in C++ to display all alternate elements from two-dimensional array A (starting from A[0] [0]).<br \/>\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/25478719238_f2e08818da_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(206-6)\" width=\"324\" height=\"159\" \/><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void ALTERNATE(int A[][3],int N.int M)\r\n{\r\nint i,j;\r\nfor(i=0;i&lt;=N-1;i++)\r\n{\r\nif(i%2==0)\r\n{\r\nj=0;\r\n}\r\nelse\r\n{\r\nj=l;\r\n}\r\nwhile(j&lt;=M-1)\r\n{\r\ncout&lt;&lt;A[i][j]&lt;&lt;\" \";\r\nj+=2;\r\n}\r\n}\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 26:<br \/>\n<\/strong><\/span>An array S[10][30] is stored in the memory along the column with each of the element occupying 2 bytes. Find out the memory location of S[5][10], if the element S[2][15] is stored at the location 8200. <strong>Delhi 2012<br \/>\n<span style=\"color: #eb4924;\"><span style=\"color: #008000;\">\u0410nswer:<\/span><\/span><br \/>\n<\/strong><\/p>\n<pre>R = 10, C = 30, B = 8200, M = 2 bytes, I = 5, J = 10, Lr = 2, Lc= 15\r\nFor column-wise allocation,\r\nAddress of\r\nS[I][J]=B + W[(I-Lr)+R(J-Lc)]\r\nS[5][10] = 8200+2(5-2)+10(10-15)] \r\n= 8200 + 2[3+10x(-5)]\r\n= 8200 + 2[3-50]\r\n= 8200 + 2x(-47)\r\n= 8200 - 94 \r\n= 8106<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 27:<br \/>\n<\/strong><\/span>An array T[20] [10] is stored in the memory along the column with each of the element occupying 2 bytes. Find out the memory location of T[10][5], if the element T[2] [9] is stored at the location 7600. <strong>All India 2012<br \/>\n<span style=\"color: #eb4924;\"><span style=\"color: #008000;\">\u0410nswer:<\/span><\/span><br \/>\n<\/strong><\/p>\n<pre>R = 20, C = 10, B = 7600, M = 2 bytes, I = 10, J = 5, Lr = 2, Lc =9\r\nFor column-wise allocation,\r\nAddress of\r\nT[I][J] = B + W(I-Lr)+R(J-Lc)]\r\nT[10][5] = 7600 + 2(10-2)+20(5-9)]\r\n= 7600 + 2[8 + 20 x (-4)]\r\n= 7600 + 2[8-80]\r\n= 7600 + 2(-72)\r\n= 7600 - 144 \r\n= 7456<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 28:<br \/>\n<\/strong><\/span>Write a COLSUM function in C++ to find sum of each column of a N*M matrix. <strong>Delhi 2011<br \/>\n<span style=\"color: #eb4924;\"><span style=\"color: #008000;\">\u0410nswer:<\/span><\/span><br \/>\n<\/strong><\/p>\n<pre>void C0LSUM(int A[4][3],int r,int c)\r\n{\r\nint Sum[10],i,j; \r\nfor(j=0;j&lt;c;j++)\r\n{\r\nSum[j] = 0; \r\nfor(i=0;i&lt;r;i++)\r\nSum[j] += A[i][j]; \r\ncout&lt;&lt;\"Sum of columns\"&lt;&lt;j+1&lt;&lt;\"=\"&lt;&lt;Sum[j]&lt;&lt;endl;\r\n}\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 29:<br \/>\n<\/strong><\/span>Write a DSUM function in C++ to find sum of diagonal element of a N*N matrix. <strong>All India 2011<br \/>\n<span style=\"color: #eb4924;\"><span style=\"color: #008000;\">\u0410nswer:<\/span><\/span><br \/>\n<\/strong><\/p>\n<pre>void DSUM(int A[][3],int n)\r\n{\r\nint i,j,sum=0;\r\ncout&lt;&lt;\"\\nSum of Diagonal One\"; \r\nfor(i=0;i&lt;n;i++)\r\n{\r\nsum += A[i][i];\r\n}\r\ncout&lt;&lt;sum&lt;&lt;\" \";\r\nsum=0;\r\ncout&lt;&lt;\"\\nSum of Diagonal Two\"; \r\nfor(i=0;i&lt;n;i++)\r\n{\r\nsum += A[i][n-(i+1)];\r\n}\r\ncout&lt;&lt;sum&lt;&lt;\" \";\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 30:<br \/>\n<\/strong><\/span>An array P[20][50] is stored in the memory along the column with each of the element occupying 4 bytes. Find out the memory location for the element P[15][10], if P[0][0] is stored at 5200. <strong>Delhi 2011<br \/>\n<span style=\"color: #eb4924;\"><span style=\"color: #008000;\">\u0410nswer:<\/span><\/span><br \/>\n<\/strong><\/p>\n<pre>B = 5200, M = 4 bytes, R = 20, C = 50. I = 15, J = 10, Lr = 0, Lc = 0\r\nFor column-wise allocation.\r\nAddress of\r\nP[I][J] = B + W[(I-Lr)+R(J-Lc)]\r\nP[15][10] = 5200 + 4[(15-0)+20(10-0)] \r\n= 5200 + 4[15 + 20 x 10]\r\n= 5200+4(15+200)\r\n= 5200+4(215) \r\n= 5200+860 = 6060<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 31:<br \/>\n<\/strong><\/span>An array G[50][20] is stored in the memory along the row with each of the element occupying 8 bytes. Find out the memory location for the element G[10][15], if G[0][0] is stored at 4200. A<strong>ll India 2011<br \/>\n<span style=\"color: #eb4924;\"><span style=\"color: #008000;\">\u0410nswer:<\/span><\/span><br \/>\n<\/strong><\/p>\n<pre>B = 4200, W = 8 bytes, R = 50, C = 20, I = 10, J = 15, Lr = 0, Lc =0\r\nFor row-wise allocation,\r\nAddress of\r\nG[I][J] =B + W[C(I-Lr)+(J-Lc)] \r\nG[10][15] = 4200+8[20(10-0)+(15-0)]\r\n= 4200+8[20(10)+15]\r\n= 4200+8(215)\r\n= 4200+1720 = 5920<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 32:<br \/>\n<\/strong><\/span>Write a function int SKIPSUM(int A[ ][3], int N, int M) in C++ to find and return the sum of elements from all alternate elements of a two-dimensional array starting from A[0][0]. <strong>Delhi 2010<br \/>\n<span style=\"color: #eb4924;\"><span style=\"color: #008000;\">\u0410nswer:<\/span><\/span><br \/>\n<\/strong><\/p>\n<pre>int SKIPSUM(int A[][3],int N.int M)\r\nint s=0,C=1; \r\nfor(int i=0;i&lt;N;i++) \r\nfor(int j=0;j&lt;M;j++)\r\n{\r\nif(C%2 != 0) \r\ns = s+A[i][j];\r\nC++;\r\n}\r\nreturn s;\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 33:<br \/>\n<\/strong><\/span>Write a function int ALTERSUM(int B[ ][5], int N, int M) in C++ to find and return the sum of elements from all alternate elements of a two-dimensional array starting from B[0][0]. <strong>All India 2010<br \/>\n<span style=\"color: #eb4924;\"><span style=\"color: #008000;\">\u0410nswer:<\/span><\/span><br \/>\n<\/strong><\/p>\n<pre>int ALTERSUM(int B[][5],int N,int M)\r\n{ \r\nint s=0,C=1; \r\nfor(int i=0;i&lt;N;i++) \r\nfor(int j=0;j&lt;M;j++)\r\n{\r\nif(C%2 != 0) \r\ns = s+B[i][j];\r\nC++;\r\n}\r\nreturn s;\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 34:<br \/>\n<\/strong><\/span>An array P[50] [60] is stored in the memory along the column with each of the element occupying 2 bytes. Find out the memory location for the element P[10][20], if the base address of the array is 6800. <strong>Delhi 2010<br \/>\n<span style=\"color: #eb4924;\"><span style=\"color: #008000;\">\u0410nswer:<\/span><\/span><br \/>\n<\/strong><\/p>\n<pre>B = 6800, M = 2 bytes, R = 50, C = 60, I = 10, J = 20, Lr = 0, Lc =0 \r\nFor column-wise allocation,\r\nAddress of\r\nP[I][J] = B + W[I-Lr)+R(J-Lc)]\r\nP[10][20] = 6800 + 2[(10-0)+50(20-0)] \r\n= 6800+2(10+20*50)\r\n= 6800+2(10+1000)\r\n= 6800+2020 = 8820<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 35:<br \/>\n<\/strong><\/span>An array T[90][100] is stored in the memory along the column with each of the element occupying 4 bytes. Find out the memory location for the element T[10][40], if the base address of the array is 7200. <strong>All India 2010<br \/>\n<span style=\"color: #eb4924;\"><span style=\"color: #008000;\">\u0410nswer:<\/span><\/span><br \/>\n<\/strong><\/p>\n<pre>B = 7200, W = 4 bytes, R = 90, C = 100, I = 10, J = 40, Lr = 0, Lc = 0 \r\nFor column-wise allocation,\r\nAddress of\r\nT[I][J] = B + W[(I-Ir)+R(J-Lc)]\r\nT[10][40] = 7200 + 4L(10-0)+90(40-0)] \r\n= 7200+4(10+40*90)\r\n= 7200+4(10+3600)\r\n= 7200+14440 = 21640<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 36:<br \/>\n<\/strong><\/span>Define a function SWAPCOL( ) in C++ to swap (interchange) the first column elements with the last column elements, for a two-dimensional integer array passed as the argument of the function.<br \/>\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/25478718948_c039f68b8e_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(207-1)\" width=\"313\" height=\"265\" \/><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void SWAPCOL(int A[][5], int M, int N)\r\nint i,temp;\r\nfor(i=0;i&lt;M;i++)\r\n{\r\ntemp = A[i][O];\r\nA[i][0] = A[i][N-1]; \r\nA[i][N-l] = temp;\r\n}\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 37:<br \/>\n<\/strong><\/span>Define a function SWAPARR( ) in C++ to swap (interchange) the first row elements with the last row elements, for a two-dimensional integer array passed as the argument of the function.<br \/>\n<img loading=\"lazy\" src=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/24483735797_74a68004bf_o.png\" alt=\"important-questions-class-12-computer-science-c-data-structure-(207-2)\" width=\"345\" height=\"273\" \/><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>void SWAPARR(int a[][5],int r,int c)\r\nint i,t;\r\nfor(i=0;i&lt;c;i++)\r\n{\r\nt=a[0][i]; \r\na[0][i]=a[r-l][i]; \r\na[r-1][i]=t;\r\n}\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 38:<br \/>\n<\/strong><\/span>An array S [40] [30] is stored in the memory along the column with each of the elements occupying 4 bytes. Find out the base address and address of element S[20][15], if an element S[15][10] is stored at the memory location 7200. <strong>Delhi 2009<\/strong><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>R=40 C=30 W=4 bytes\r\nFor colum-wise allocation,\r\nAddress of\r\nS[I][J] = B + N(I-Ir)+R(J-Lc)] Address of\r\nS[15][10] = B+((10-0)*40+(15-0))*4 \r\n7200 = B+(400+15)*4 \r\n7200 = B+(415*4)\r\n7200 = B+1660\r\nB = 7200-1660 \r\n= 5540 \r\nNow, address of S[20][15]\r\n= B+W [(J-0)*R+(I-0)]*4 \r\n= 5540+[(15-0)*40+(20-0)]*4 \r\n= 5540+(15*40+20)*4 \r\n= 5540+(600+20)*4 \r\n= 5540+620*4 \r\n= 5540+2480 \r\n= 8020<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 39:<br \/>\n<\/strong><\/span>An array T[50] [20] is stored in the memory along the column with each of the elements occupying 4 bytes. Find out the base address and address of element T[30][15], if an element T[25][10] is stored at the memory location 9800. <strong>All India 2009<br \/>\n<span style=\"color: #eb4924;\"><span style=\"color: #008000;\">\u0410nswer:<\/span><\/span><br \/>\n<\/strong><\/p>\n<pre>R = 50, C = 20, W = 4 bytes \r\nFor column-wise allocation,\r\nAddress of  \r\nT[I][J] = B + W[(I-Lr)+R(J-Lc)] \r\nT[25][10] = B + 4[(25-0)+50(10-0)] \r\nT[25][10]= B+4[25+50*10]\r\n9800 = B+2100 \r\nB = 9800-2100 \r\nB = 7700\r\nHence, base address = 7700 \r\nNow, for address of element T[30][15] \r\nT[30][15] = 7700+4[30+50x15]\r\n= 7700+4*780 \r\n= 7700+3120 \r\n= 10820<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Question 1: Write the definition of a function AddUp(int Arr[ ], int N) in C++, in which all even positions [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_yoast_wpseo_focuskw":"CBSE Class 12 Computer Science","_yoast_wpseo_title":"CBSE Class 12 Computer Science Important Question with Solutions","_yoast_wpseo_metadesc":"Check CBSE Class 12 Computer Science important questions with solutions to excel in your exams. Get ready for your exams with infinity learn.","custom_permalink":"cbse\/class-12\/computer-sciencec\/important-questions-for-data-structure\/"},"categories":[93,21],"tags":[],"table_tags":[],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v17.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>CBSE Class 12 Computer Science Important Question with Solutions<\/title>\n<meta name=\"description\" content=\"Check CBSE Class 12 Computer Science important questions with solutions to excel in your exams. Get ready for your exams with infinity learn.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/infinitylearn.com\/surge\/cbse\/class-12\/computer-sciencec\/important-questions-for-data-structure\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CBSE Class 12 Computer Science Important Question with Solutions\" \/>\n<meta property=\"og:description\" content=\"Check CBSE Class 12 Computer Science important questions with solutions to excel in your exams. Get ready for your exams with infinity learn.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/infinitylearn.com\/surge\/cbse\/class-12\/computer-sciencec\/important-questions-for-data-structure\/\" \/>\n<meta property=\"og:site_name\" content=\"Infinity Learn by Sri Chaitanya\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/InfinityLearn.SriChaitanya\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-01-25T14:58:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-02T13:20:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/24481761297_3356b74139_o.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@InfinityLearn_\" \/>\n<meta name=\"twitter:site\" content=\"@InfinityLearn_\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prasad Gupta\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"27 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"CBSE Class 12 Computer Science Important Question with Solutions","description":"Check CBSE Class 12 Computer Science important questions with solutions to excel in your exams. Get ready for your exams with infinity learn.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/infinitylearn.com\/surge\/cbse\/class-12\/computer-sciencec\/important-questions-for-data-structure\/","og_locale":"en_US","og_type":"article","og_title":"CBSE Class 12 Computer Science Important Question with Solutions","og_description":"Check CBSE Class 12 Computer Science important questions with solutions to excel in your exams. Get ready for your exams with infinity learn.","og_url":"https:\/\/infinitylearn.com\/surge\/cbse\/class-12\/computer-sciencec\/important-questions-for-data-structure\/","og_site_name":"Infinity Learn by Sri Chaitanya","article_publisher":"https:\/\/www.facebook.com\/InfinityLearn.SriChaitanya\/","article_published_time":"2022-01-25T14:58:02+00:00","article_modified_time":"2024-02-02T13:20:43+00:00","og_image":[{"url":"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/24481761297_3356b74139_o.png"}],"twitter_card":"summary_large_image","twitter_creator":"@InfinityLearn_","twitter_site":"@InfinityLearn_","twitter_misc":{"Written by":"Prasad Gupta","Est. reading time":"27 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Organization","@id":"https:\/\/infinitylearn.com\/surge\/#organization","name":"Infinity Learn","url":"https:\/\/infinitylearn.com\/surge\/","sameAs":["https:\/\/www.facebook.com\/InfinityLearn.SriChaitanya\/","https:\/\/www.instagram.com\/infinitylearn_by_srichaitanya\/","https:\/\/www.linkedin.com\/company\/infinity-learn-by-sri-chaitanya\/","https:\/\/www.youtube.com\/c\/InfinityLearnEdu","https:\/\/twitter.com\/InfinityLearn_"],"logo":{"@type":"ImageObject","@id":"https:\/\/infinitylearn.com\/surge\/#logo","inLanguage":"en-US","url":"","contentUrl":"","caption":"Infinity Learn"},"image":{"@id":"https:\/\/infinitylearn.com\/surge\/#logo"}},{"@type":"WebSite","@id":"https:\/\/infinitylearn.com\/surge\/#website","url":"https:\/\/infinitylearn.com\/surge\/","name":"Infinity Learn by Sri Chaitanya","description":"Surge","publisher":{"@id":"https:\/\/infinitylearn.com\/surge\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/infinitylearn.com\/surge\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https:\/\/infinitylearn.com\/surge\/cbse\/class-12\/computer-sciencec\/important-questions-for-data-structure\/#primaryimage","inLanguage":"en-US","url":"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/24481761297_3356b74139_o.png?v=1642486144","contentUrl":"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/24481761297_3356b74139_o.png?v=1642486144","width":291,"height":125},{"@type":"WebPage","@id":"https:\/\/infinitylearn.com\/surge\/cbse\/class-12\/computer-sciencec\/important-questions-for-data-structure\/#webpage","url":"https:\/\/infinitylearn.com\/surge\/cbse\/class-12\/computer-sciencec\/important-questions-for-data-structure\/","name":"CBSE Class 12 Computer Science Important Question with Solutions","isPartOf":{"@id":"https:\/\/infinitylearn.com\/surge\/#website"},"primaryImageOfPage":{"@id":"https:\/\/infinitylearn.com\/surge\/cbse\/class-12\/computer-sciencec\/important-questions-for-data-structure\/#primaryimage"},"datePublished":"2022-01-25T14:58:02+00:00","dateModified":"2024-02-02T13:20:43+00:00","description":"Check CBSE Class 12 Computer Science important questions with solutions to excel in your exams. Get ready for your exams with infinity learn.","breadcrumb":{"@id":"https:\/\/infinitylearn.com\/surge\/cbse\/class-12\/computer-sciencec\/important-questions-for-data-structure\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/infinitylearn.com\/surge\/cbse\/class-12\/computer-sciencec\/important-questions-for-data-structure\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/infinitylearn.com\/surge\/cbse\/class-12\/computer-sciencec\/important-questions-for-data-structure\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/infinitylearn.com\/surge\/"},{"@type":"ListItem","position":2,"name":"CBSE Class 12 Computer Science Important Question with Solutions 2024"}]},{"@type":"Article","@id":"https:\/\/infinitylearn.com\/surge\/cbse\/class-12\/computer-sciencec\/important-questions-for-data-structure\/#article","isPartOf":{"@id":"https:\/\/infinitylearn.com\/surge\/cbse\/class-12\/computer-sciencec\/important-questions-for-data-structure\/#webpage"},"author":{"@id":"https:\/\/infinitylearn.com\/surge\/#\/schema\/person\/143c89c9c2f5e56ed91f96dde47b0b05"},"headline":"CBSE Class 12 Computer Science Important Question with Solutions 2024","datePublished":"2022-01-25T14:58:02+00:00","dateModified":"2024-02-02T13:20:43+00:00","mainEntityOfPage":{"@id":"https:\/\/infinitylearn.com\/surge\/cbse\/class-12\/computer-sciencec\/important-questions-for-data-structure\/#webpage"},"wordCount":2411,"publisher":{"@id":"https:\/\/infinitylearn.com\/surge\/#organization"},"image":{"@id":"https:\/\/infinitylearn.com\/surge\/cbse\/class-12\/computer-sciencec\/important-questions-for-data-structure\/#primaryimage"},"thumbnailUrl":"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2021\/12\/24481761297_3356b74139_o.png","articleSection":["Important Questions","Study Materials"],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/infinitylearn.com\/surge\/#\/schema\/person\/143c89c9c2f5e56ed91f96dde47b0b05","name":"Prasad Gupta","image":{"@type":"ImageObject","@id":"https:\/\/infinitylearn.com\/surge\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/200104b443e586c76c46cadc113d931c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/200104b443e586c76c46cadc113d931c?s=96&d=mm&r=g","caption":"Prasad Gupta"},"url":"https:\/\/infinitylearn.com\/surge\/author\/prasad\/"}]}},"_links":{"self":[{"href":"https:\/\/infinitylearn.com\/surge\/wp-json\/wp\/v2\/posts\/25536"}],"collection":[{"href":"https:\/\/infinitylearn.com\/surge\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/infinitylearn.com\/surge\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/infinitylearn.com\/surge\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/infinitylearn.com\/surge\/wp-json\/wp\/v2\/comments?post=25536"}],"version-history":[{"count":0,"href":"https:\/\/infinitylearn.com\/surge\/wp-json\/wp\/v2\/posts\/25536\/revisions"}],"wp:attachment":[{"href":"https:\/\/infinitylearn.com\/surge\/wp-json\/wp\/v2\/media?parent=25536"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/infinitylearn.com\/surge\/wp-json\/wp\/v2\/categories?post=25536"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/infinitylearn.com\/surge\/wp-json\/wp\/v2\/tags?post=25536"},{"taxonomy":"table_tags","embeddable":true,"href":"https:\/\/infinitylearn.com\/surge\/wp-json\/wp\/v2\/table_tags?post=25536"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}