Software Development Engineer Interview Questions | Glassdoor.co.uk

Glassdoor uses cookies to improve your site experience. By continuing, you agree to our use of cookies. OK | Learn More

Software Development Engineer Interview Questions

94

Software development engineer interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

The questions were not very difficult but you really need to have all the concepts crystal-clear and be ready to apply them successfully. One of the questions was "how to count the letters in this string:" "The quick brown fox jumps over the lazy dog";

11 Answers

public static int countWords(String str){ if(str == null || str.isEmpty()) return 0; int count = 0; for(int e = 0; e < str.length(); e++){ if(str.charAt(e) != ' '){ count++; while(str.charAt(e) != ' ' && e < str.length()-1){ e++; } }else{ e++; } } return count; }

Sorry, the above version has an error!!!!!!!!!!!!!!!!!!!!!!!! concider this one: public static int countWords(String str){ if(str == null || str.isEmpty()) return 0; int count = 0; for(int e = 0; e < str.length(); e++){ if(str.charAt(e) != ' '){ count++; while(str.charAt(e) != ' ' && e < str.length()-1){ e++; } } } return count; }

# That's why i love Python: len(re.findall('[a-zA-Z]', s))

Are you married? Do you have any kids? Where do you live?

2 Answers

Asked question: Using an already implemented method Rand5() that generates a random integer between the ranges 1-5 uniformly. Using this method, implement a a new method that returns a random integer in the range 1-7 uniformly, i.e. Rand7(). Basically this is Rejection Sampling Algorithm. See http://leetcode.com/2010/11/rejection-sampling.html

2 Answers

Write a function that takes a position (x,y) in a go game graph and returns a boolean telling if this position contains a white or black piece and if this piece is trapped or not.

1 Answer

Question about designing a class hierarchy given a set of requirements.

1 Answer

1. How to achieve automatic type conversion from type X to type Y? a. X can define the member function operator Y() b. a) or b) can be used c. Y can define the constructor Y(const X&) d. none of the above 2. class Coordinate{ int x; int y; public: Coordinate(int a=0, int b=0) { x=a; y=b; }; }; What are the values for the following object: Coordinate point(10); a. x=10,y=0 b. x=0,y=10 c. x=10,y=10 d. x=0,y=0 3. What type of argument can the following function take : Void foo(); a. any number or type of arguments b. a character c. an integer d. no an integer argument of any type 4. Consider the following function declarations in a header file: void doit(char *, int); int doit(char *) ; float doit(float, float) ; Which of the following declarations cannot follow in the same header: a. void doit(int, char *); b. int doit(int) ; c. float doit(char *) ; d. int doit(int, int) ;

3 Answers

Can't quite remember. Everything was reasonable for the technical level they were hiring for.

1 Answer

Can you think of a situation when you had to work with a large set of data? How did you go about it, and what did you learn from the numbers?

Full software lifecycle, networking questions, QA management, escalations handling.

110 of 94 Interview Questions