728x90 AdSpace

  • Latest News

    Sunday 1 December 2019

    Revision Test | Computer Science | Set - B | XII | Kinfer

    CS-3

    REVISION TEST SERIES - 3

    Class XII

    COMPUTER SCIENCE

     Time : 1 hr.

    SET - B

    Marks : 30 
    1.  What is linked list?  1
    2. What is meant by underflow? 1
    3. Write a function In C++ which accepts an integer array and its size an arguments and swap the element of every even location with its following odd location.
    eg: if array is    1 2 3     4 5 6
    Function should rearrange - 214365
    2
    4. Write the definition of a function score (int SC [1, int size) in C++ which should check all the elements of the array and give an increase of 10 to those scores which are less than 50;
    eg 45, 35, 20, 7, 80, 90
    After execution array will change to
    55, 45, 30, 17, 80, 90 
    2
    5. An algorithm requires two stacks of sizes M and N that are to be maintained in the memory. Illustrate with an example how will you adjust two stacks in one dimensional array with M + N memory locations so that the overflow condion is minimised. 3
    6. Write a function PORBOOK ( ) in C++ to perform delete operation from a Dynamic Stack, which contains Bno and Title Consider the following definition of NODE, while writing your C++ code.
    strict NODE
    {
        int Boo;
        char Title (20];
        NODE * Link;
    }
    4
    7. An array P[40][30] is stored in the memory along the row with each of the element occupying 4 bytes and the very first element has the memory location as 4500, find out the memory location for the element P[10][20] 3
    8. Write a met defined function Row (int AR I 1(5], int R, int C) in C++ to swap the first row values with the last row values.
    eg.  25 35 45 1 3
    55 65 75 2 5
    43 53 63 73 83
    After function call the col-11(111 will change to
    43 53 63 73 83
    55 65 75 2 5
    25 35 45 1 3
    3
    9. Give post fix form of the followin.
    A* (B + C (C+D) * (E + F) /G) * H
    2
    10. Write a function in C++ which accepts an integer- array and its size an arguments and replaces elements having odd values with its twice its value and elements having even values with thrice its value.
    eg Consider array
        1, 4, 3, 4, 3, 6
    After function call
        2, 12, 6, 12, 6, 18
    3
    11.
    1. List the disadvvantages of implementing stack as array. Describe means for overcoming the problems.
    2. Write an algorithm for inserting node at the end.
    2
    12. Each node of a STACK contains the following information, in addition to pointer field:
    i) Pin code of city ii) Name of city
    Give the structure of node for the linked stack in question.
    TOP Is a pointer points to the topmost node of the STACK. Write the following functions.
    i) PUSH (). To push a node in to the stack which is allocated dynamically.
    ii) POP (). To remove a node from the stack and release the memory
    • Blogger Comments
    • Facebook Comments

    0 comments:

    Post a Comment

    Item Reviewed: Revision Test | Computer Science | Set - B | XII | Kinfer Rating: 5 Reviewed By: Unknown
    Scroll to Top