CBSE Guess > Papers > Important Questions > Class XII > 2010 > Computer Science > Computer Science By Ravi Kiran CBSE CLASS XII Q.1. Write a function in C++, which accepts an integer array and its size as parameters and rearranges the array in reverse. Example:If an array of nine elements initially contains the elements as 4, 2, 5, 1, 6, 7, 8, 12, 10 Then the function should rearrange the array as 10,12, 8, 7, 6, 1, 5, 2, Solution: void receive(int A[ ], int size) Q.2. An array Arr[40][10] is store in the memory along the column with each element occupying 4 bytes. Find out the base address of the location Arr[3][6] if the location Arr[30][10] is stored at the address 9000. Solution: Children, Try this answer as an assignment. Q.3. Write a function in C++ to print the product of each column of a two dimensional array OUTSIDE DELHI 2008 Q.1. Write a function in C++, which accepts an integer array and its size as arguments and swap the elements of every even location with its following odd location. Example : If an array of nine elements initially contains the elements as 2,4,1,6,5,7,9,23,10
then the function should rearrange the array as 4,2,6,1,7,5,23,9,10
void SwapArray(int A[ ], int N) Paper By Mr. Ravi Kiran |