Developer Program Engineer Interview Questions
- 0of 0 votes
AnswerWhat would be an example of glass-box testing?
- paramjitmaan786 November 01, 2012 in India for ruby on rails
(ruby on rails)
Throwing random data at your application to see if it breaks
Testing a particular code path in the program
Automatically making small but syntactically legal changes to the program
Testing the result of a predetermined input to the program| Report Duplicate | Flag | PURGE
Ericsson Developer Program Engineer - 0of 0 votes
AnswersWhat is the benefit of using factories over fixtures?
- paramjitmaan786 November 01, 2012 in India for ruby on rails
(ruby on rails)
Factories create full-featured objects, but fixtures do not
Factory objects persist across specs, while fixture objects do not
Factories keep tests independent, while fixtures may not
All objects from a certain factory are exactly the same, while objects from a fixture may vary| Report Duplicate | Flag | PURGE
Ericsson Developer Program Engineer - 0of 0 votes
AnswersWhat is the main difference between BDD and TDD?
- paramjitmaan786 November 01, 2012 in India for ruby on rails
(ruby on rails)
BDD focuses on validation while TDD focuses on verification
BDD focuses on verification while TDD focuses on validation
BDD is better than TDD at testing methods independently
BDD generally uses mocks and stubs more than TDD| Report Duplicate | Flag | PURGE
Cognzant Technology Solutions Developer Program Engineer - 0of 0 votes
AnswerWhich of the following statements are true regarding mocks in RSpec? Select all that apply.(ruby on rails)
- paramjitmaan786 November 01, 2012 in India for ruby on rails
Mocks are used to isolate tests from the database
Model mocks automatically have access to all existing methods of the model
Mocks can be created with default attribute values| Report Duplicate | Flag | PURGE
Cognzant Technology Solutions Developer Program Engineer - 0of 0 votes
AnswersWhich of the following lists the kinds of tests in order of increasing code exercise complexity?(ruby on rails)
- paramjitmaan786 November 01, 2012 in India for ruby on rails
Integration tests, functional or module tests, unit tests
Unit tests, integration tests, functional or module tests
Unit tests, functional or module tests, integration tests
Functional or module tests, unit tests, integration tests| Report Duplicate | Flag | PURGE
Cognzant Technology Solutions Developer Program Engineer - 0of 0 votes
AnswersYour test randomly changes the comparison operators in your conditionals. This is which kind of testing?
- paramjitmaan786 November 01, 2012 in India for ruby on rails
Mutation test
Glass-box test
Black-box test
Fuzz test| Report Duplicate | Flag | PURGE
Facebook Developer Program Engineer - 0of 0 votes
AnswerWhich of the following guarantees that you have exhaustively unit-tested a piece of code?
- paramjitmaan786 November 01, 2012 in India for ruby on rails
100% C0 (statement) coverage
100% C1 (branch) coverage
100% C2 (path) coverage
None of the above| Report Duplicate | Flag | PURGE
Facebook Developer Program Engineer - -2of 2 votes
AnswersFor a service like TMDb with an HTTP-based RESTful API, a Ruby wrapper library such as the ruby-tmdb gem is necessary in order to call the service from a Ruby app.
- paramjitmaan786 November 01, 2012 in India for ruby on rails
True
False| Report Duplicate | Flag | PURGE
Facebook Developer Program Engineer - 0of 0 votes
AnswersRSpec's stub method can be used to override a method call on
- paramjitmaan786 November 01, 2012 in India for ruby on rails
an instance only
a class only
an instance or a class only
any Ruby object| Report Duplicate | Flag | PURGE
Accenture Developer Program Engineer - 0of 0 votes
AnswersSally wants to create a dating website and decides to write an algorithm that takes a list of male and female users' preferences and returns the best matching of males with females. To test her algorithm, she manually calculates the best match. She then runs the algorithm and checks to see if the observed output matches with her manual calculation. What FIRST principle is clearly not being followed?
- paramjitmaan786 November 01, 2012 in India for ruby on rails
Fast
Independent
Repeatable
Self-checking
Timely| Report Duplicate | Flag | PURGE
Accenture Developer Program Engineer - 0of 0 votes
AnswersHigh coverage can always be achieved by writing a unit test for every method.
- paramjitmaan786 November 01, 2012 in India for ruby on rails
True
False| Report Duplicate | Flag | PURGE
Accenture Developer Program Engineer - 0of 0 votes
AnswersFor a given array size is know but elements using index is not accessible. 2 given functions are below:
- singhSahab October 29, 2012 in United States
1. getIndexOfNthLargest(int n) // returns the index of nth largest number. Like for n=1 the index of largest element will be returned, for n=2 the index of 2nd largest number will be returned.
2. reverseArray(int i) // reverse the elements of the array from index 0 to i
How to sort the array in place?| Report Duplicate | Flag | PURGE
Goldman Sachs Developer Program Engineer Algorithm - 0of 0 votes
AnswersIf there are two threads in your app - T1 and T2. T2 has high priority. However, for some reason the priority decreases automatically. What could be the reason? How will you debug it? How will you fix it so that pririty stays the same, no matter what.
- snehaldesh1 October 05, 2012 in United States| Report Duplicate | Flag | PURGE
Apple Developer Program Engineer C - 0of 0 votes
AnswersGiven an array { -2 3 5 0 -3 7 -1}. Sort the array in such a way that array should contain -ve numbers first and then zero and then all +ve numbers. (Note: order of +ve number and order of -ve numbers should be same after sorting). For ex: the o/p of above array is {-2 -3 -1 0 3 5 7}
- prashaenator October 05, 2012 in India for BING| Report Duplicate | Flag | PURGE
Microsoft Developer Program Engineer Algorithm - 0of 2 votes
AnswersGiven 3 sorted arrays. Find(x,y,z), (where x is from 1st array, y is from 2nd array, and z is from 3rd array), such that Max(x,y,z) - Min(x,y,z) is minimum.
- prashaenator October 05, 2012 in India for BING| Report Duplicate | Flag | PURGE
Microsoft Developer Program Engineer Algorithm - 0of 0 votes
AnswersIf we have given a data type, how can we find the precision value for this........need just an algo....
- praveen303 September 28, 2012 in India| Report Duplicate | Flag | PURGE
HCL Developer Program Engineer Algorithm C++ - 0of 0 votes
AnswersWrite an algorithm that takes a file containing a sequence of lines representing all the folders in a mailbox where each line is of the form Id,ParentId,Name and produces a sorted hierarchy of folders with children indented from their parents and each line containing DisplayName:Id. For example if the input is:
- barathrum September 24, 2012 in United States
4,17,Scott
1,0,Spock
17,0,McCoy
9,17,Kirk
Then the output should be:
McCoy:17
Kirk:9
Scott:4
Spock:1| Report Duplicate | Flag | PURGE
Adobe Developer Program Engineer Algorithm - -1of 1 vote
Answerwhat is diffarence between semop and semctl?
- nagendragurajarapu September 18, 2012 in United States
we can change the semaphores using both apis?what is the diffarence?| Report Duplicate | Flag | PURGE
Ericsson Developer Program Engineer Linux Kernel - 0of 0 votes
Answersdouble factorial of a number N
- ayush.tiet August 22, 2012 in India
example: N!!| Report Duplicate | Flag | PURGE
Microsoft Developer Program Engineer Algorithm - -1of 1 vote
Answers1)find first N factorial primes (not prime factorials)
- ayush.tiet August 22, 2012 in India| Report Duplicate | Flag | PURGE
Microsoft Developer Program Engineer Algorithm - -1of 1 vote
Answerswrite efficient program to find the sum of x^y + y^ and x^y - y^x and x^y/y^x and x^y*y^x
- ayush.tiet August 22, 2012 in India| Report Duplicate | Flag | PURGE
Microsoft Developer Program Engineer Algorithm - 0of 0 votes
AnswersThe shortest code by character count that takes a single input integer N (N >= 3) and returns an array of indices that when iterated would traverse an NxN matrix according to the JPEG "zigzag" scan pattern.
For Ex
- jane August 14, 2012 in United States1 2 3 (Input) 3 --> 4 5 6 --> 7 8 9 Output--> 1 2 4 7 5 3 6 8 9 1 2 3 4 (Input) 4 --> 5 6 7 8 9 10 11 12 13 14 15 16 output 1 2 5 9 6 3 4 7 10 13 14 11 8 12 15 16
| Report Duplicate | Flag | PURGE
Amazon Developer Program Engineer Algorithm - 0of 0 votes
Answershow many times the base class are called in the following code.
- shanelinnz August 14, 2012 in United Statesclass Base { } class D1:public Base { } class D2:virtual public Base { } class DD: public D1, public D2 { } int main() { DD cObj; }
| Report Duplicate | Flag | PURGE
Developer Program Engineer C++ - -2of 2 votes
AnswersFor Winshuttle Written Test Search on YouTube:
- mnithero1 August 13, 2012 in India
Winshuttle Placement Paper| Report Duplicate | Flag | PURGE
Developer Program Engineer - 0of 0 votes
Answershow to sort 100 numbers given using memory size sufficient for 20 elements only(like array of size 20)
- anu August 07, 2012 in India| Report Duplicate | Flag | PURGE
Morgan Stanley Developer Program Engineer - 0of 0 votes
Answershow to convert an english sentence into our native language sentence(given an dictionary of english-native language)..what data structures will be used for implementing dictionary and how to convert using it??
- anu August 07, 2012 in India| Report Duplicate | Flag | PURGE
Morgan Stanley Developer Program Engineer - 0of 0 votes
AnswersYou are blindfolded and 20 coins are placed on the table in front of you. Out of them 10 coins have heads facing up and other tails. You are allowed to flip and move the coins. You should divide those coins into two sets such that one set contains 10 heads and other tails. You are allowed to only move or flip the coins
- irraju July 31, 2012 in India| Report Duplicate | Flag | PURGE
McAfee Developer Program Engineer - 0of 0 votes
AnswersRemove whitespace characters in a string, in place and with out shifting
- irraju July 29, 2012 in India| Report Duplicate | Flag | PURGE
Microsoft Developer Program Engineer