Brain Station-23 Software Engineer Trainee Interview Questions - 2023
Brain Station 23 - Software Engineer Trainee 2023 (1st Phase-Initial Screening) Question
Question Part ( 45 MCQ Question)
There will be 45 MCQ questions (12 to 56) related to Software Engineer Trainee basic skill knowledge. Don't browse the internet or take photographs. You have to answer all the questions.
1. Which of the following is not fundamental concept in Object-Oriented Programming?
- Inheritance
- Encapsulation
- Polymorphism
- Multi-threading
2. Which of the following combination of characteristics represent an object in Object-Oriented Programming? (2.5 Points)
- Identity, state and thread safety
- state, behavior and thread safety
- Identity, state and behavior
- Identity, behavior and thread safety
3. Which of the following is true about method overloading in OOP? (2.5 Points)
- The method signature must include the return type
- The return type of overloaded methods must be the same
- The number and types of parameters must be the same
- The number and types of parameters must be different
4. What type of casting is demonstrated in the following code?
class Employee {}
class Manager extends Employee {}
Employee employee = new Manager ();(2.5 Points)
- Upcasting
- Downcasting
- Both Upcasting and Downcasting
- No casting
5. What will be the output of the following code?
class Counter{
static int count = 0;
public Counter(){
}
count += 1;
System.out.print(count+ " ");
}
Counter counter1 = new Counter();
Counter counter2 = new Counter();
Counter counter3 = new Counter(); (2.5 Points)
- 012
- 111
- 123
- 023
6. Which of the following represents IS-A relationship in Object-Oriented Programming?(2.5 Points)
- Abstraction
- Encapsulation
- Polymorphism
- Inheritance
7. Go through the picture below and answer the questions following:
Read the options carefully
I. When an object is created, constructor is called
li. In the above example, constructor overloading is used
lii. Output from the code above is
The candidate's name is Ahmed, age is 25
Which of the question below is correct? (2.5 Points)
- i
- ii
- ii,iii
- i, ii, iii
8. In which classes instance cannot be created? (2.5 Points)
- Anonymous class
- Base class
- Virtual class
- None of the above
9. Which of the following is an advantage of adjacency list representation over adjacency matrix representation of a graph?
- DFS and BSF can be done in O(V + E) time for adjacency list represen- tation. These operations take O(V^2) time in adjacency matrix representation. Here V and E are numbers of vertices and edges respectively
- Adding a vertex in adjacency list representation is easier than adjacency matrix representation.
- Adjacency list are helpful when we need to quickly check if two nodes have a direct edge or not.
- Which of the following statements are true? (2.5 Points)
- iii
- i, ii
- ii, iii
- i, ii, iii
10. Which of the following algorithms performs fastest (time complexity is mini- mum) if we need to find out the shortest path from the node 'N' to each other node is an undirected and unweighted connected graph? (All algorithms should start performing from node N).(2.5 Points)
- DFS
- BFS
- Warshall's
- Dijkstra'
11. You are creating an operating system for the employees of Brain Station 23. But you faced a problem regarding time sharing among the applications! The prob- lem is like, the operating system must maintain a list of programs/processes which are running and must alternately allow each program to use a small slice of CPU time, one program at a time. The operating system will pick a program, let it use a small amount of CPU time and then move on to the next program and so on.
What data structure you will choose to solve this problem? (2.5 Points)
- Circular linked list
- Stack
- Binary indexed tree
- None of the above
12. What is true about the following tree? (2.5 Points)
- It's a full binary tree
- It's a complete binary tree
- It can be used to create a priority queue
- Both b and c
13. Suppose, your supervisor asked you to create a program to organize some data. But the data must be organized in a way that, if he inputs a series of data then all the data must come out sequentially. What data structure you think is prefer- able?(2.5 Points)
- Stack
- Segment tree
- Queue
- None of the above
14. What will be the output of the following code? (2.5 Points)
- 0,2,0
- -1,3,5
- Floating point exception
- 0,2,-5
15. If we have the following recurrence relation: Then T(n) in terms of Big O notation is: (2.5 Points)
- O(n)
- O(logn)
- O(log log n)
- O(root n)
16. Which one of the following is correct for Bellman Ford algorithm? (2.5 Points)
- The for loop-in gets executed for "V-1" times.
- It provides solution for single source shortest path.
- It helps to find out if a graph has negative weight cycles.
- All of the above
17. Which one is not true about Dijkstra's algorithm? (2.5 Points)
- It can be applied on graphs which have negative weight function.
- It's efficient than Bellman Ford algorithm.
- Both a & b
- None of the above
18. What will be the postfix expression for the following infix expression?
(A + B) / C * D + E ^ F(2.5 Points)
- ABC/+DE F * ^ +
- AB+CD/* E F + ^
- ABC+/D * E + F ^
- AB+C/D E F ^ +
19. Multiple words and search for a particular word. Which of the following algo- rithms should be used in the dictionary app so that the app performs the search and insertion operation most efficiently? (2.5 Points)
- Binary Search Trees
- Hash Tables
- Trie
- Ternary Search
20. Mr. Joy has been assigned homework to determine the square root of a positive number. Which of the following algorithms can he use to solve this math prob- lem? (2.5 Points)
- Kruskal's algorithm
- Breadth First Traversal
- Counting Sort
- Binary Search
21. Mr. Joy is planning to build a web browser. Now he is analyzing requirements for the navigation system of his web browser, which will preserve the browsing history. What is the appropriate data structure to use for the navigation system? (2.5 Points)
- Array
- Stack
- Queue
- Linked list
22. Which of the following sorting algorithms performs least efficiently in worst- case scenarios?
- Merge sort
- Heap sort
- Quick sort
- Counting sort
23. Which of the following statement is false for the single linked list? (2.5 Points)
- It contains a pointer that points to the previous node.
- It only can traverse in one direction
- The last node called the tail, which points to NULL.
- Time complexity of insertion is O(n)
24. Rearrange the query so that it could be executable:
1. FROM vehicles
2. HAVING COUNT(vehicles.vehicle_id) > 5
3. SELECT drivers.last_name, COUNT(vehicles.vehicle_id) AS number_of_vehicles
4. GROUP BY last_name
5. WHERE last_name = 'Patrick' OR last_name = 'Sean'
6. INNER JOIN drivers ON vehicles.vehicle_id = drivers.driver_id (2.5 Points)
- 316425
- 361254
- 316542
- 321465
25. This a query that returns all cards that have a card_number ending with "80_1". Which WHERE clause should you use to fill in the blank in this query?
SELECT card_id, card_holder_name, card_number
FROM cards ; (2.5 Points)
- WHERE card_number LIKE '%80_1'
- WHERE card_number LIKE ('%80'+'_'+'1')
- WHERE card number LIKE '%80"_"1'
- WHERE card number LIKE '%80[_]1'
26. What is the result of this query?
SELECT 5/6 AS output;
- Error
- 0
- 1
- None of the above
27. Which of the following aggregate functions ignores nulls? (2.5 Points)
- MAX
- SUM
- COUNT
- None of the above
28. What is ACID property in the Database? (2.5 Points)
- Atomicity, Consistency, Isolation, Durability
- Atomicity, Concurrency, Isolation, Durability
- Accessibility, Consistency, Integrity, Durability
- Atomicity, Consistency, Integrity, Durability
29. What is the purpose of a view in a relational database? (2.5 Points)
- To provide an alternative way to display data from one or more tables
- To store data
- To create a relationship between tables
- To create a backup of a table
30. Write a SQL query to retrieve the top 5 most expensive products in the prod- ucts table.
A) SELECT product_name, price
FROM products
ORDER BY price ASC
LIMIT 5;
B) SELECT product_name, price
FROM products
WHERE price > 5000
LIMIT 5;
C) SELECT product_name, price
FROM products
ORDER BY price DESC LIMIT 5;
D) SELECT product_name, price
FROM products
ORDER BY price DESC
FETCH FIRST 5;
(2.5 Points)
- A
- B
- C
- D
31. What type of database model is best suited for handling large amounts of un- structured data? (2.5 Points)
- Relational
- Hierarchical
- Network
- Document
32. Which of the following is not a method to improve database performance? (2.5 Points)
- Indexing
- Partitioning
- Encryption
- Denormalization
33. What would be the output of this snippet? (2.5 Points)
- 4
- 5
- 6
- None
34. Which one to use to write if a BOOK is called MONITOR, MONITOR is called PENCIL, PENCIL is called BAG, and BAG is called SHIP?(2.5 Points)
- MONITOR
- PENCIL
- BAG
- BOOK
35. Suppose a monkey can jump max 3 feet in a move. He wants to reach the top of a tree. The tree is 10 feet long. Initially he is at the bottom of the tree. The tree is slippery at some heights. The slipper points will bring the monkey down to a lower height. The slipper heights and the height of the slipping down point are given as.
Slippery heights: [4, 6, 8, 9]
Slipping down heights: [2, 3, 5, 7]
What would be the minimum number of moves to reach the top of the tree? (2.5 Points)
- 3
- 4
- 5
- Not possible
36. You have a bag containing 20 blue and 13 red balls. You randomly select two balls without replacement, and depending on whether they are the same color or different colors, you replace them with a blue or red ball respectively. The balls that you take out are not returned to the bag, so the number of balls in the bag decreases each time. What color will be the last ball remaining in the bag?
- Red ball
- Blue ball
- Green ball
- Yellow ball
37. Once upon a time, a group of detectives were presented with a challenge to identify which of the 1000 candies was poisoned, before it caused harm to any living species. They had to act fast, as the poison would take effect within an hour of consumption. The detectives knew they could use test subjects, but they needed to determine the minimum number required to solve the mystery in time. Can you help them find the solution before it's too late? (2.5 Points)
- 5
- 100
- 10
- 25
38. How many triangles are there in the given figure? (2.5 Points)
- 12
- 13
- 14
- 15
39. 5, 10, 10, 29, 17, 66
What is the next number of the series? (2.5 Points)
- 66
- 26
- 132
- 35
40. You are asked to develop an email sending application which can be used to send files too. Which protocol will you choose? (2.5 Points)
- SMTP only
- SMTP & FTP
- HTTP & FTP
- HTTP only
41. Sakib & Rakib are working on the same project. They are using git for collabo- ration. Rakib made some changes to the project and committed that on his computer. Now Sakib wants to get in sync with those changes. Which com- mands can they use to do that? (2.5 Points)
- git commit & git pull
- git push & git pull
- git merge
- git clone
42. Given the following IP address, which one is private IP?
- 100.10.0.1
- 192.168.1.1
- 11.1.2.3
- 255.255.0.0
43. QuestionWhich of the following is true about the Transmission Control Protocol
(TCP) and the User Datagram Protocol (UDP)?(2.5 Points)
- TCP guarantees that data is delivered in the order it was sent, while UDP does not.
- UDP is connection-oriented, while TCP is connectionless
- TCP is faster than UDP because it uses smaller packets.
- Both TCP and UDP use the same port numbers for different services
44. Which protocol will you use for video streaming applications to get the best performance? (2.5 Points)
- HTTPS
- TCP
- UDP
- FTP
45. I have an email address (example@gmail.com). Which protocol should I use to get the IP address? (2.5 Points)
- OTELNET
- SMTP
- DNS
- отср