Engineer Interview Questions | Glassdoor.co.in

# Engineer Interview Questions

131,397

engineer interview questions shared by candidates

## Top Interview Questions

Sort: RelevancePopular Date

### Junior Programmer at Ubisoft was asked...

14 Jul 2017
 How to check if a number is divisible by 16 without using operator / or % ?8 Answersshould do using bit-wise operatorsI will run a loop that'll subtract 16 from the number. If result is zero than it is divisible else if it goes less than zero than its is not.Bit wise right shift four times, if integer then divisible.Show more responsesfor(int i=0;in) { break; } //number is not divisible by 16 //which will be decided by the flag } }Sorry for that incompleted answer ! I want to say that simply use a loop upto n and multiply each number with 16 and store in a variable and then go for a check if it is matched by n or not. If matched then flag==true else break;If a number is divisible by 2^n, do bitwise right shift n times and then bitwise left shift n times to get back the same number.if(16>>4 == 0 ) True; else FalseThe above condition should be 1 instead of 0. if(16>>4 == 1 ) True; else False

25 Sep 2018

### Assistant Systems Engineer at Tata Consultancy Services was asked...

20 Oct 2012
 What will you do when your girl friend is getting married on the same day as a important client meeting?8 Answersi will do marriage first because meeting may be postpond or prepaid but marriage date not come again again.right manright manShow more responsesyes, firstly i will do marriageYesMarriage firstAs per time should Attend marriage first after that meet my clientI would rather invite my client ti my wedding. afrer giving him a feast will set up the meeting there itself.

### Senior Software Engineer at Virtusa was asked...

19 Sep 2010
 if there are 6 people in a team, how many handshakes will be there8 Answers15There will be 30 hand shakes. In total we have 6 people, so it will be 6 * (6-1) (i.e 1 person will shake hands with 5 people)15 A | B | C| D | E | F | A will perform 5 B will perform 4 C will perform 3 D will perform 2 E will perform 1 F ultimately hand shakes with everyoneShow more responses6c2==6!/(2!*4!)=15lets consider A,B,c,d,e,f so a shakes hand with the other 5 ..b with oter 4 and so on so at last 5+4+3+2+1=1515 people handshakes at a time you have given 6 person first of all the peoples is arranged in row 6 number people have an 5 option for handshakes after that 6 number person out then total number of people 5 again....again....same procedure apply.......Each one will shake hand 5 times, 6x5 -> 30 times6c2= 15

### Associate Software Engineer at Legato Health Technologies was asked...

17 Jun 2020
 What is your dream job ?8 AnswersHave you got result after interviewhave you received offer letter?Did you received ur offer letter?Show more responsesAny offer letter receivedIn how many days did you get the result of technical panel round?Which type of questions are asked in online testIn how many days did you get the test results?my dream job is the one which gives me a passion to learn new things to the position in a company

### Software Developer at Zoho was asked...

17 Feb 2019
 Short coding : 1. They gave an array A with N elements we need to find if addition of two elements in the array will be the element K Ex: I/P: a[5]={7,3,2,6,4,} K=10; Op:7+3=10 6+4=10 2. Two sorted array a[],b[] will be given we need to merge the array without temporary array. 3. An array arr[] with elements are given we need to sort the odd number in descending on left side and the even numbers in ascending on the right side of the array Ex: I/P: arr[5]={7,4,3,5,2} O/P:7 5 3 2 48 AnswersHave you mail for 3rd round?Is 3rd round over?I am not completed the 2nd round successfully so I did not know about further round questions..Show more responsesOkay Bro. I was in the same batch. In 2nd Round, I have completed 5 questions. Still I didn't get result.pls tell about...all round conducst same day or different day1st round conducted on 9th Feb 2019 at 10:00 am and the result will be mailed me on 12th Feb and the second round conducted on 16th FebSame day I also attended. Cleared 5 questions in 2nd Round. Still Didn't get the result.

### Software Engineer II at Amazon was asked...

19 Jun 2012
 Given an large list of unsorted numbers, find the smallest number. You can access the list only 3 numbers at a time, and keep moving forward 1 number at a time.6 AnswersOtherwise called the sliding window problemUse the selection sort and after the pass stop the iterating. Time complexity will be O(N) & only one swap.Use the selection sort and after the first pass stop the iterating. Time complexity will be O(N) & only one swap.Show more responsesDid they asked to write the code of the solution? or just pseudo code.And did they added any constraints? Otherwise this is pretty straight forward problem using Insertion sort.You can access the list only 3 numbers at a time: It tells we can read three numbers one after other in N/3 Iterations. So Time complexity will be O(N/3)This is sliding window problem and priority queue DS can be used to solve this.

### Assistant Software Engineer at Nucleus Software Exports was asked...

16 Apr 2016
 Q1. Print the 1st and 100th element of Fibonacci series together, 2nd and 99th element and so on. Q2. Print the following pattern 1 2 4 3 6 9 4 8 12 16 5 10 15 20 25. (Condition was using one for loop)8 AnswersSince both the question required 2 for loops. A1. I created a function fibo() that returns finbonacci nth element using recursion . And run a for loop from 1 to 100 and print the fibo(i) and fibo(100-i) [i running from 1 to 100]. A2. I created a recursive call to a function that acted as the outer loop and a base condition to exit. and in the else part do the printing using a single for loop.For question 2: //here i = 5 void print_sequence(int i) { int num = 1; int count = 0; for(;num= num) { count = 0; num++; cout<For question 2: //here i = 5 void print_sequence(int i) { int num = 1; int count = 0; for(;num= num) { cout=num) { count = 0; num++; cout<Show more responses#include using namespace std; int main() { int j=1; for(int i=1; i<=10; ){ cout << j*i << " "; if(j == i){ i++; j=0; cout << endl; } j++; } return 0; }#include #include #include #include #include #include using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int i; cin >> i; int j=1; for(int k=1;kj) { cout << endl; j++; k=0; continue;} else cout << j*k << " "; } }For the fibonacci, the best way wud be to create an array of fibonacci numbers from 1-100 using dp which uses just one for loop. and then print sumultaneously the following asked numbers.#include using namespace std; main() { int i,j; for(i=1,j=1;i<=5;) { cout<import java.util.Scanner; import static java.lang.System.out; class PA{ public static void main(String...args){ int a=1,i=1,j=1; Scanner sc=new Scanner(System.in); int n=sc.nextInt(); while(a!=0){ out.print(i+" "); if(i==(j*j)){ out.println(""); j++; i=j; } else{ i=i+j; } a++; if(i==(n*n)) {out.print(i); break;} } } }

### Assistant Systems Engineer Trainee at CMS IT services was asked...

11 Oct 2017
 are you able to live in Andheri on rent with salary 8000 ?7 Answersbut It will be very difficult in surviving.NopeYesShow more responsesYesYesYesNo

12 Sep 2015