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 DELHI 1999: 3.a) Suppose a 1D array AR containing
integers is arranged in ascending order. Write
a user defined function in C++ to search for
one integer from AR with the help of binary
search method, to show presence of the
number in the array. The function should
have three parameters: (1) an array AR (2) the
3.b) An array A[10][20] is stored in the
memory with each element requiring 4 bytes
of storage. If the base address of the array in
the memory is 400, determine the location of
A[8][13] when the array VAL is stored (i) Row
major (ii) Column major. Solution: Children, Try this answer. 3.c) Write a user-defined function in C++ to
find and display the multiplication of row
elements of two dimensional array A[4][6]
containing integers.
DELHI 1998: 3.a) Suppose an array P containing float is arranged in ascending order. Write a user defined function in C++ to search for one float from p with the help of binary search method. The function should return an integer 0 to show absence of the number in the array. The function should have the parameters as (1) an array P (2) the number DATA to be searched (3) number of elements N.
CBSE Computer Science Solved Revision Tour By Mr. Ravi Kiran ( [email protected] ) |
|