Adobe India Written Test 2006

HI Everybody,
I attended Adobe test on 16-07-2006. it was cool test. The test was 3 hours. I am sending u Questions Asked on Engineering and C. Merit-Trac conducted the test. The test was for both Development & testing Domain. I attended for Dev posn.

ADOBE Written Test

1) Wap to reverse a linked list and sort the same.

2) Given two integers A & B. Determine how many bits required to convert
A to B. Write a function int BitSwapReqd(int A, int B);

3) Write an algorithm to insert a node into sorted linked list.After inserting,
the list must be sorted.

4) Without using /,% and * operators. write a function to divide a number by 3.
itoa() function is available.

5) Wap to swap two integer pointers.

6)Write a funcn int round(float x) to round off a floating point num to int.

7) write an ALP to find sum of First n natural numbers using the following Instructions

LDA num ; load Accumulator with num
DCR R ; decrement Register R
INR R ; increment Register R
MOV x,y ; move the contents of register y into register x
JZ label ; jump to label if A=0
DJNZ label; Decrement & Jump if A <> 0
you can use B & C registers in addition to A register

8) Find the n th node in a Singly Linked list starting from the End in a Single Pass.

9)prove that a tree is BST.what is height of a tree?

10) Given A,B & C Boolean polynomials.Prove That (A+BC)=(A+B)(A+C)
This question is related to Adobe Interview

Showing Answers 1 - 29 of 29 Answers

ram

  • Jul 18th, 2006
 

Hi, Do you know something about testing paper. Please tell something.

  Was this answer useful?  Yes

Lavanya

  • Aug 27th, 2006
 

I have applied for Quality Engineer post in Adobe.. Kindly help me.. i am a 2006 fresher..

  Was this answer useful?  Yes

rsk

  • Nov 24th, 2006
 

Total no of nodes of a binary tree of depth d

= 1 + 2 + 2^2 + 2^3+ .......+2^d

No of leaf nodes = 2^d

No of non leaf nodes 
= root nodes + elements upto d-1th level

= 1+ (2(1-2^(d-1))/(1-2)) #gp sum of elements

=(1-2+2-2^d)/(1-2)

=(1-2^d)/-1

=2^d-1

=no of leave nodes -1

so no of leve nodes = no of non_leaf nodes +1

i.e no of leaf nodes in any binaryy tree is one more than the no of nodes with degree 2

  Was this answer useful?  Yes

RaniSKumar

  • Nov 26th, 2006
 

bool bIsAllSmaller(tree* root, int val)

{

return ((root == NULL) or

(

((root->info) < val) and

bIsAllSmaller(root->left,val) and

bIsAllSmaller(root->right,val)

));

}

bool bIsAllBigger(tree* root, int val)

{

return ((root == NULL) or

(

((root->info) >= val) and

bIsAllBigger(root->left,val) and

bIsAllBigger(root->right,val)

));

}

bool bIsBst(tree* root)

{

return ((root == NULL) or

(bIsAllSmaller(root->left,root->info) and

bIsAllBigger(root->right,root->info) and

bIsBst(root->left) and

bIsBst(root->right)

)

);

}

  Was this answer useful?  Yes

RaniSKumar

  • Nov 26th, 2006
 

height is the maximum level of a node in a tree

static int treeheight(tree* ptr)

{

if (ptr==NULL)

{return -1;}

return {(1+max(ptr->left,ptr->right))}

}

  Was this answer useful?  Yes

RaniSKumar

  • Nov 27th, 2006
 

(a+b)(a+c) = aa+ac+ba+bc // destributive low

aa = a .

hence

aa+ac+ba+bc = a(1+c+b)+bc

1+anythig = 1

hence

a(1+c+b) +bc = a+bc

i.e (a+b)*(a+c)=a+bc

  Was this answer useful?  Yes

kyarams champ

  • Dec 5th, 2006
 

Total no. of nodes are 'n'.Let n2 are the no of nodes that have two childrenand n1 are the no of nodes that have one childrenand n0 are the no of nodes that have no childrenSum of out-degree of all nodes = 2* (n2) + n1 + 0*(n0)Sum of in-degree of all nodes = n2 + n1 + n0 -1 (as root node has no incoming arrow)But we know, in any graph, Sum of out-degree of all nodes = Sum of in-degree of all nodes Therefore, 2* (n2) + n1 + 0*(n0) = n2 + n1 + n0 -1 simplifying, we get.n2 = n0-1

  Was this answer useful?  Yes

Sunil Gobbannavar

  • Dec 12th, 2006
 

i attended adobe 10/12/06 for 1 yr exp in testing domain(QA)

15 were anlytical questions- which consisted data subquestions after reading a paragraph like all p's are M's like this big question. data interprtation

30 were aptitude like answering value in column one is greater or column 2 were greater or equal or cant be found out simple apti questions

45 were on testing which really tested your fundamentals of testing black box testing/functional testing  regression , testing definations etc. 

also descriptive writing was there apart from objective like write 10 test cases to test given test case.

give 3 resons why developer should test his code & 3 reasons why should a developer not test his own code...

for further info contact me on: astrosunilnomy@yahoo.co.in  09881712854

  Was this answer useful?  Yes

mrinmoy

  • May 1st, 2007
 

Wap to reverse a linked list and sort the same.

void reverse(NODEPTR list)
{
    NODEPTR p,q,r,s;
    int temp;

    p = q = list;

    do
    {
        for(q=p;q!=NULL && q!=s ;q=q->next)
            r=q;
        temp = p->info;
        p->info=r->info;
        r->info = temp;
        p = p->next;
        s = r;
    } while(s!=p && s->next!=p);
}

void sortlist(NODEPTR list)
{
    NODEPTR p,q,r = NULL;
    int temp;

    do
    {
        p = list;
        q = p->next;
        while(q!=NULL && p->next!=r)
        {
            if(p->info > q->info)
            {
                temp = p->info;
                p->info = q->info;
                q->info = temp;
            }
            p = p->next;
            q = q->next;
        }
        r = p;
    }while(list->next!=r);
}

  Was this answer useful?  Yes

mrinmoy

  • May 1st, 2007
 


2) Given two integers A & B. Determine how many bits required to convert
A to B. Write a function int BitSwapReqd(int A, int B)

#include

void showbits( int n);

int main()
{
    int a,b,sa,sb;
    register int i = 0;
    int andmask,count=0;

    clrscr();
    printf("nEnter A :: ");
    scanf("%d",&a);
    printf("nEnter B :: ");
    scanf("%d",&b);

    showbits(a);
    showbits(b);
    for(i=15;i>=0;i--)
    {
        andmask = 1 << i;
        sa = a & andmask;
        sb = b & andmask;
        if(sa != sb)
            count++;
    }

    printf("n%d Bits are required to convert A(%d) to B(%d)...",count,a,b);
    getch();
    return 0;
}

void showbits( int n)
{
    int a,andmask;
    register int i = 0;

    for(i=15;i>=0;i--)
    {
        andmask = 1 << i;
        a = n & andmask;
        a==0 ? printf("0") : printf("1");
    }
}

  Was this answer useful?  Yes

pardeepg

  • Sep 25th, 2008
 

isbst(tree* node)
{
 
 return (node->left == NULL && node->right == NULL);

          if(node->left == NULL && node->right->info >= node->info) isbst(node->right);
          if(node->left->info < node->info && node->right == NULL ) isbst(node->left);
          if(node->left->info < node->info && node->right->info >= node->info)
          { isbst(node->left); isbst(node->right); }
       
}

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions