CBSE Guess > Papers > Important Questions > Class XII > 2010 > Computer Science > Computer Science By Ravi Kiran CBSE CLASS XII No_of_travellers No_of_buses (d) Answer the questions (i) to (iv) based on the following code : 4 (i) How many bytes will be required by an object of class Drug and an object of class PainReliever espectively ? (ii) Write names of all the data members which are accessible from the object of class PainReliever. (iii) Write names of all the members accessible from member functions of class Tablet. (iv) Write names of all the member functions which are accessible from objects of class PainReliever. 3. (a) Write a function in C++ which accepts an integer array and its size as
arguments/parameters and exchanges the values of first half side elements with the
second half side elements of the array. 3 (b) 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 an element Arr[20][5], if the location Arr[2][2] is stored at the address 3000. 4 (c) Write a function in C++ to perform a DELETE operation in a dynamically allocated
queue considering the following description : 4 (d) Write a function in C++ to print the sum of all the values which are either divisible by 3 or are divisible by 5 present in a two dimensional array passed as the argument to the function. 3 (e) Evaluate the following postfix notation of expression : 20 10 + 5 2 * – 10 / 2 Paper By Mr. Ravi Kiran |