Google  Placement Paper   Candidate Experiences   IIT Guwahati-10 Nov 2010

Google  Placement Paper   Candidate Experiences   IIT Guwahati-10 Nov 2010


  • Posted by  FreshersWorld 
    7 Jan, 2012

    Submitted By Sameer Biswas

    Package: 16 Lakh

    Paper Type: CSE B Tech/M Tech /PHD

    Experience: Question is base on C/C++/Algo ,OS(little), Puzzles mixed Aptitude.

    Questions: 30 questions and 2 programs time 1 hour.
    All Questions are multiple type. I just mention the questions options not remember

    Section A:

    1. Find the value of n the following code:
    int F(int n)
    if( n!=0& !(n&(n-1)))
    printf("%d",n)
    n is
    i. Even no
    ii. Odd nos
    iii. Non zero numbers
    iv. Number with power 2

    Ans: iv.

     
    Description: Take a number like 8.
    so n= 8 and n-1= 7
    So n =1000 and
    n-1= 111
    And n&n-1= 1000 & 111=1111( All bits one)
    Now !(n & n-1) = 0000
    So if(0) which satisfies the if condition. Means when and is a number of power 2, it will satisfy if condition.

    More Doubt Comments me.

2009-2016 downloadmela.com. All rights reserved.