Digital
  1. simplyfy k map

    1 x x 0
    1 x 0 1
Programming
  1. Implementation of priority queue
    a. tree
    b linked list
    c doubly linked list.
  2. max and avg. height of sorted binary tree.
  3. size of integer is
    a. 2 bytes
    b 4 bytes
    c. machine dependant
    d compiler dependent.
  4. Questions On Pointer to Function
  5. main()
    {
    int i,*j;
    i=5;
    j=&i;
    printf("\ni= %d",i);
    f(j);

    printf("\n i= %d",i);
    }

    void f(int*j)
    {
    int k=10;
    j= &k;
    }

    output is
    a 5 10
    b 10 5
    c 5 5
  6. int f(int a)
    {
    a=+b;

    //some stuff
    }

    main()
    {
    x=fn(a);
    y=&fn; }
    what are x & y types
    a) x is int y is pointer to afunction which takes integer value
  7. main()
    {
    char a[10]="hello";
    strcpy(a,'\0');
    printf("%s",a);
    }
    output of the program?
    a) string is null b) string is not null c) program error d)
  8. void f(int *p){
    static val=100;
    val=&p;
    }
    main(){
    int a=10;
    printf("%d ",a);
    f(&a);
    printf("%d ",a);
    }
    what will be out put?
    a)10,10
  9. void f(int value){
    for (i=0;i<16;i++){>>1) printf("1")
    else printf("0");
    }
    }
    what is printed?
    a) bineray value of argument b)bcd value c) hex value d) octal value
  10. for hashing which is best on terms of buckets
    a)100 b)50 c)21 d)32 ans 32
  11. size of(int)
    a) always 2 bytes
    b) depends on compiler that is being used
    c) always 32 bits
    d) can't tell
  12.     struct a
    {
    int a;
    char b;
    int c;
    }

    union b
    {
    char a;
    int b;
    int c;
    };
    which is correct .
    a. size of a is always diff. form size of b.(ans.)
    b. size of a is always same form size of b.
    c. we can't say anything because of not-homogeneous (not in ordered)
    d. size of a can be same if ...
  13. x=x^y;
    y=x^y;
    x=x^y;
    x=?
  14. In a link list we want to go from last to first element and vice
    versa.
    Which is efficient
    a. Cirular List
    b. Doubly Link List
    c. Double Ended Link List
    d. Simple List
  15. Hash function h(i)=i mod 5, there are 5 buckets 0,1,2,3,4. Rehashing is
    (h(i)+1)mod 5,(h(i)+2)mod 5......
    5 numbers are to be enterd, Find the number in a given bucket..
  16. To reconstuct a Tree which sequence is enough
    a. Inoreder sequence
    b. Preorder and Post order
    c. In, Pre, Post order are required
    d. Any one can be used
  17. (i)
    for(i=0;i
  18. convert a inorder string to post order
  19. int (*a[5])() what is this declaration?