Google Inc. Candidate-Experiences Contributed by Sameer Biswas updated on Jul 2021
Google Candidate-Experiences |   12512

Google Candidate-Experiences



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)))
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.