CBSE Computer Science - Revision Tour(Solved) CBSE Guess > eBooks > Class XII > CBSE Computer Science Arrays Solved Revision Tour By Mr. Ravi Kiran COMPUTER SCIENCE ARRAYS OUTSIDE DELHI 2008: 3.a) Write a function in C++, which acceptsan 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.
3.b) An array Arr[50][10] is store in the memory along the row with each element occupying 2 bytes. Find out the Base address of the location Arr[20][50], if the location Arr[10][25] is stored at the address 10000. Solution: Children, Try this answer as an assignment. 3.d) Write a function in C++ to print the product of each row of a two dimensional array passed as the arguments of the function Example: if the two imensional array contains Then the output should appear as:
DELHI 2007: 3.a) Write function in C++ which accepts aninteger array and size as arguments and replaces elements having odd values with thrice its value and elements having even values with twice its value. Example : if an array of five elements initially contains elements as 3, 4, 5, 16, 9 Solution:
CBSE Computer Science Solved Revision Tour By Mr. Ravi Kiran ( [email protected] ) |
|