Engineer Internship Interview Questions | Glassdoor

Engineer Internship Interview Questions

258

Engineer internship interview questions shared by candidates

Top Interview Questions

Sort: Relevance Popular Date

Software Engineer Internship at Amazon was asked...

Apr 16, 2011
 How would you count the number of words in a string consisting of uneven number of spaces between words( not dictionary words)? With and without library functions. 3 Answers With -Use Java String Tokenizer or split function int wc(char *s) { if (!s) return -1; int wc = 0; /* prune initial continuous spaces */ while (*s == ' ') ++s; /* count spaces, i.e words! */ while (*s != '\0') { if (*s == ' ') { ++wc; s++; /* prune continuous spaces */ while (*s == ' ') ++s; } else ++s; } /* sentence can end without space, check last word has been accounted */ if (*(s-1) != ' ') ++wc; return wc; } char str[] = "jdjd jdjd jriri"; count=0; for(i=0; i<=strlen(str); i++) { // str[i] while(str[i]==' ') { i++; } count++; while(str[i]!=' ') { i++; } }

Software Development Engineer In Test/SD Summer Internship at Microsoft was asked...

May 17, 2012
 Given an array of positive and negative numbers, give an algorithm that would find the sequence of numbers that give the largest sum. The numbers have to be in sequential order. 2 Answers The naive algorithm will take O(n^2) time, but it is very easy to code. The divide and conquer algorithm will take O(nlgn) time, but a little challenge to implement. If by "sequential order" you mean that the indices of the numbers in the subsequence must be consecutive, I think this should work in O(n): int main() { int best[N], B, i, a[N]; //input to a; best[0] = a[0]; B = a[0]; for(i = 1; i best[i-1]) best[i] = B + a[i]; else best[i] = best[i-1]; B = max(a[i], B + a[i]); } return best[N-1]; return 0; }

Software Engineer Internship at Orbitz Worldwide was asked...

Mar 18, 2011
 What is the angle between hour hand and minute hand at 3.15? 2 Answers Lets deal with the hour hand first. In 60 minutes (1 hour) the hand travels 5 minutes on the clock face, so in 1 minute it travels 0.0833 minutes on the clock face (5/60). At 3'0clock the hour hand was exactly at 3. After 15 minutes it has moved 0.0833*15 = 1.25 minutes on the clock face. At 3.15 the minute hand is exactly at 3, so the difference between the hour and minute hand is 1.25 minutes. So now we just convert 1.25 minutes into degrees to get the angle between the two hands. We do that with the following logic - in 60 minutes the minute hand turns 360 degrees, so in 1 minute the hand turns 360/60 = 6 degrees, so in 1.25 minutes the hand turns 6*1.25 = 7.5 degrees. This is the angle between the two hands at 3.15 http://en.wikipedia.org/wiki/Clock_angle_problem

Summer Software Engineering Internship at Symantec was asked...

Feb 9, 2012
 What is the difference between a Class in C and an Object in C++? 2 Answers C has no class- C is a functional programming language!!!!! I think you mean difference between class and object in C++, C is a low level language with no Class functionality (it does have struct however). A class is a collection of variables and functions for the purposes of OO programming. An object is an in stance of the class that can call its member functions and variables

Summer Software Engineering Internship at Symantec was asked...

Feb 9, 2012
 What is the difference between a signed and unsigned integer variable type? 2 Answers Signed can hold positive and negative numbers, unsigned numbers can only hold positive numbers (or 0) signed value ranges from (-Max_Val, Max_Val), while signed goes from (0, 2*Max_Val). Max_Val is the predefined maximum value for the specific data type. They both have the same range of 2*Max_Val

Software Engineer Internship at Amazon was asked...

Apr 16, 2011
 Given two arrays one with expected numbers and other with actual numbers determine which number is missing in the actual array 2 Answers XOR all the elements together - the result will be the missing number. This works assuming there's only one missing number, but it's the fastest way. If there are multiple missing elements, use a hashtable. missing = SUM(expected) - SUM(actual) (again works only if 1 no. is missing!)

Financial Engineering Internship at Duff & Phelps was asked...

Feb 25, 2012
 How many simulations would it take to get an accuracy of less than or equal to 1% 2 Answers Use the 1/sqrt(N) Does it not depend on the variance of the Monte Carlo estimates. The standard error does scale with 1/sqrt(n) but also depends on the variance of the algorithm simulations. The number of simulations can be lowered using variance reduction techniques such as antithetic, control variante, etc.

Engineering Internship at Baker Hughes was asked...

Mar 10, 2012
 ur best subject in school and why 2 Answers be precise in ur answer and choose a subject relevant tobur major HI... I´m from Venezuela and I`d like to know about your phone interview with Baher Hughes... Tell me how it was 4 you--here`s my e-mail lanti117@hotmail.com thanks

Software Engineer Internship at Jump Trading was asked...

Mar 13, 2012
 Write codes for the Nth Fibonacci number. 3 Answers You were actually asked to write two versions, one is the recursive one, and the other non-recursive. Then explain why the recursive one is very bad. int fib_rec(int n) { switch(n) { case 0: return 0; case 1: return 1; } return fib_rec(n-2) + fib_rec(n-1); } int fib_iter(int n) { switch(n) { case 0: return 0; case 1: return 1; } int f0=0; int f1=1; for(int i=2;i<=n;++i) { int f2=f0+f1; f0=f1; f1=f2; } return f1; } The recursive solution is terrible, because it takes exponential time. The iterative solution isn't bad - this takes O(n) time. It's possible to do O(log n) time using Binet's formula.

Software Engineer Internship at Microsoft was asked...

Jun 12, 2012
 what was a technical difficulty and how have you overcome it. 2 Answers personal experience Technical Difficulties is nothing it's just our weakness, we can overcome it by increasing our knowledge related to that field and give perfact output.
110 of 258 Interview Questions