Programmer Intake Quiz
General
1. What are the steps in traditional software development life cycle (SDLC)?
2. What are some different types of testing?
3. Given two points A ( x 1 , y 1 ) ∧B( x2 , y 2) , define the equation of a line going through A and B.
4. What is the next number in the sequence?
1 9 10 19 29 [ ]
5. Given the following tree, write the nodes in postfix order:
6. What is the difference between ‘stack’ and ‘queue’?
7. Arrange in increasing order of complexity:
a. O ( n2 )
b. O(nlogn)
c. O(n)
d. O(logn)
8. What is the difference between HTTP and HTTPS?
9. What is the difference between ‘supervised’ and ‘unsupervised’ machine learning?
10. Define false positive.
Database
11. How do you implement a many-to-many relationship at the database level between two entities?
12. Given a table T(col1,col2,col3), write an SQL statement to select col1 and col3 from rows where
col2 has no value.
13. Given tables T1(id,name) and T2(id,project), write an SQL statement to produce a list of
(name,project) tuple – all names should appear irrespective of whether any projects are associated or not.
14. Given table PRODUCT(sku,name,description,unit_price), how do you select products whose
name starts with ‘Gi’?
15. What is the purpose of a database index?
16. What is the difference between a ‘full outer join’ and a ‘cross join’?
Programming
17. What are the principles of object-oriented programming?
18. What is the difference between a ‘compiler’ and an ‘interpreter’?
19. Which of the following is odd? (Put an X in the appropriate box.)
a. [ ] Python
b. [ ] [Link]
c. [ ] C
d. [ ] R
20. What is the output of the following Python code snippet?
a = 1
b = a - 1
print(“a/b =“, a/b)
21. What is the output of the following Python code snippet?
list = [1,2,3,4,5]
[Link](0,0)
[Link](‘a’)
for i in range(0,len(list),2):
print(list[i], end=’*’)
22. Considering the C programming language, which of the following is odd?
a. [ ] int
b. [ ] main
c. [ ] void
d. [ ] const
23. Name a sorting algorithm that uses divide-and-conquer approach.
24. The recursive definition of n! is: n !=n × ( n−1 ) !
What is a recursive function? Write a recursive function for calculating n!
25. Write code using nested loops to display the following.
*
***
*****