CBSE Guess > Papers > Important Questions > Class XII > 2010 > Computer Science > Computer Science By Ravi Kiran CBSE CLASS XII OUTSIDE DEHI 2005 Q.1.Write a function in C++ which accepts an integer array and its size as arguments and exchanges the values of first half side elements with the second half side elements of the array. Solution: Refer Delhi 2005 Q.3a. Q.2. An array Arr[35][15] is stored in the memory along the row with each of its element occupying 4 bytes . Find out the Base address and the address of element Arr[20][5] , if the location Arr[2][2] is stored at the address 3000. Solution: Children, Try this answer as an assignment. Q.3. Write a function in C++ to print sum of all values which either are divisible by 3 or divisible by 5 present in a 2D array passed as the argument of the function. Ans. DELHI 2004 Q.1. Define the function SwapArray(int[ ], int),that would expect a 1D integer array
NUMBERS and its size N. the function should rearrange the array in such a way that the values
of that locations of the array are exchanged. (Assume the size of the array to be even). Solution: Q.2. An array ARR[5][5] is stored in the memory with each element occupying 3 bytes of space. Assuming the base address of ARR to be 1500, compute the address of ARR[2][4], when the array is stored : Solution: Children, Try this answer as an assignment. Q.3. Write a function in C++ to find the sum of diagonal elements from a 2D array of type float. Use the array and its size as parameters with float as its return type. Solution: Paper By Mr. Ravi Kiran |