Software Development Programmer Interview Questions

33,168 software development programmer interview questions shared by candidates

you have 100 doors in a row that are all initially closed. you make 100 passes by the doors starting with the first door every time. the first time through you visit every door and toggle the door (if the door is closed, you open it, if its open, you close it). the second time you only visit every 2nd door (door #2, #4, #6). the third time, every 3rd door (door #3, #6, #9), etc, until you only visit the 100th door.
Sep 7, 2010

you have 100 doors in a row that are all initially closed. you make 100 passes by the doors starting with the first door every time. the first time through you visit every door and toggle the door (if the door is closed, you open it, if its open, you close it). the second time you only visit every 2nd door (door #2, #4, #6). the third time, every 3rd door (door #3, #6, #9), etc, until you only visit the 100th door.

Write a program to find out in a sorted array the sum of any two numbers present in the array is closest to the a number given. if you have an array 4, 6, 8,24,36 and the given number is 31 then output should be 24 + 6 = 30
May 24, 2012

Write a program to find out in a sorted array the sum of any two numbers present in the array is closest to the a number given. if you have an array 4, 6, 8,24,36 and the given number is 31 then output should be 24 + 6 = 30

You have a building with 100 stories. You also have two glass balls. You can drop the glass balls as many times as you want before they break. How can you find the floor at which they start breaking with the fewest number of drops?
Apr 21, 2012

You have a building with 100 stories. You also have two glass balls. You can drop the glass balls as many times as you want before they break. How can you find the floor at which they start breaking with the fewest number of drops?

2nd question: 250 points. Smart Assembly Language Given a program compile it and print its output to STDOUT. The given language has 8 types of statements: ECHO 1 => prints the given number to STDOUT. Eg: ECHO 1 prints 1 to STDOUT EXIT => exits the program SET a 0 => assign variable a value 0, i.e. equivalent to a = 0 ADD 1 2 b => add 1(first) and 2(second) and assign its value to b(third), equivalent to b = 1 + 2. Value 3 will be assigned to variable b GOTO and LABEL LABEL 12 <statement> <statement> <statement> GOTO 12 The GOTO statement jumps to corresponding LABEL (defined by argument). The LABEL can occur either before or after GOTO statement. IF and END IF a 10 <statement> <statement> <statement> END If a(first argument) is equal to 10(second argument) then only statements between IF and END will be executed otherwise they will bot be executed. CONTINUE IF a 10 <statement> <statement> CONTINUE <statement> END CONTINUE is used inside IF END block. CONTINUE jumps to the corresponding IF statement of the block. Note: All arguments are whole numbers only. Variables names can only consist alphabetic[a-z] characters. All variables are intially 0. You don't need to SET a variable before using it. Example 1 Input SET a 0 LABEL 100 ADD a 1 a ECHO a IF a 5 EXIT END GOTO 100 Output 1 2 3 4 5 Example 2 Input SET a 1 SET b 2 SET goal 5 SET flag 0 IF flag 0 ADD a b c IF a goal ADD a a a SET flag 1 END ECHO a SET a b SET b c CONTINUE END Output 1 2 3 10
avatar

Software Development Engineer

Interviewed at Smartprix

3.4
Aug 20, 2017

2nd question: 250 points. Smart Assembly Language Given a program compile it and print its output to STDOUT. The given language has 8 types of statements: ECHO 1 => prints the given number to STDOUT. Eg: ECHO 1 prints 1 to STDOUT EXIT => exits the program SET a 0 => assign variable a value 0, i.e. equivalent to a = 0 ADD 1 2 b => add 1(first) and 2(second) and assign its value to b(third), equivalent to b = 1 + 2. Value 3 will be assigned to variable b GOTO and LABEL LABEL 12 <statement> <statement> <statement> GOTO 12 The GOTO statement jumps to corresponding LABEL (defined by argument). The LABEL can occur either before or after GOTO statement. IF and END IF a 10 <statement> <statement> <statement> END If a(first argument) is equal to 10(second argument) then only statements between IF and END will be executed otherwise they will bot be executed. CONTINUE IF a 10 <statement> <statement> CONTINUE <statement> END CONTINUE is used inside IF END block. CONTINUE jumps to the corresponding IF statement of the block. Note: All arguments are whole numbers only. Variables names can only consist alphabetic[a-z] characters. All variables are intially 0. You don't need to SET a variable before using it. Example 1 Input SET a 0 LABEL 100 ADD a 1 a ECHO a IF a 5 EXIT END GOTO 100 Output 1 2 3 4 5 Example 2 Input SET a 1 SET b 2 SET goal 5 SET flag 0 IF flag 0 ADD a b c IF a goal ADD a a a SET flag 1 END ECHO a SET a b SET b c CONTINUE END Output 1 2 3 10

Viewing 451 - 460 interview questions

Glassdoor has 33,168 interview questions and reports from Software development programmer interviews. Prepare for your interview. Get hired. Love your job.