Software Engineer Interview Quiz Welcome to your Software Engineer Interview Quiz 25 Click Next to start the MCQ Test. Please contact Admin if any issue arose Full Name Mobile Number Email Address Expected Salary (in BDT) 1. A database needs to be migrated to a new server with minimal downtime. What method is best?(a) Use mysql dump and restore on the new server.(b) Use a cold backup and restore on the new server.(c) Use replication and then switch over to the new server.(d) Copy the data files directly. 2. A database has very large tables that are rarely updated but frequently read. How can you minimize the impact of long running read queries?Use a memory storage engineUse a read only replicaUse a write through cache(d) Use a write behind cache 3. A database stores JSON data representing product configurations. How can you efficiently query and extract specific values from the JSON data?(a) Use regular expressions in WHERE clauses.(b) Convert JSON to relational tables.(c) Use MySQL's JSON functions and virtual columns.(d) Perform client-side JSON parsing. 4. A SaaS application's database uses a multi-tenant architecture. Each tenant's data is logically separated, but all tenants share the same database instance. How can you ensure that one tenant's heavy queries don't impact the performance of other tenants?(a) Use separate database instances for each tenant.(b) Implement resource groups and control resource allocation for each tenant.(c) Rely on operating system-level process isolation.(d) Increase the overall database server resources. 5. A database is experiencing high CPU usage. How can you determine if it is due to inefficient queries?(a) Check the error log.(b) Check the slow query log(c) Check the binary log.(d) Check the general log. 6. What is the output of the following Python code?myList = ['a', 'b', 'c', 'd', 'e']del myList[1:3]print(myList)A) ['a', 'b', 'c', 'd', 'e']B) ['a', 'd', 'e']C) ['a', 'c', 'd', 'e']D) ['a', 'b', 'd', 'e'] 7. Which sorting algorithm generally performs the best (in terms of average-case time complexity) when sorting the following array in ascending order? arr = [9, 3, 1, 5, 13, 12]A) Selection SortB) Quick SortC) Merge SortD) Bubble Sort 8. What will be the output of the following code?class Animal: def sound(self): return "Some sound" class Dog(Animal): def sound(self): return "Bark" class Puppy(Dog): pass p = Puppy() print(p.sound())A. Some soundB. BarkC. ErrorD. None 9. What is the time complexity of the below code? def fib(n, memo=None): if memo is None: memo = {} if n in memo: return memo[n] if n == 0: return 0 elif n == 1: return 1 memo[n] = fib(n-1, memo) + fib(n-2, memo) return memo[n] n = 10 print(f"Fibonacci of {n} is: {fib(n)}") A) O(n^2)B) O(n!)C) O(2^n)D) O(n) 10. What is the output of the following code? def func(x): if x == 0: return 0 return x + func(x - 1) print(func(5)) a) 5b) 10c) 15d) 0 11. Which Python decorator is used to define a class-based view in Django?a) @classmethodb) @staticmethodc) @viewd) @method_decorator 12. Which Django REST framework class is used to create a read-only API endpoint?a) ModelViewSetb) ReadOnlyModelViewSetc) GenericAPIViewd) APIView 13. What is the purpose of the @action decorator in Django REST framework?a) To define custom actions on a ViewSetb) To handle authenticationc) To serialize datad) To manage URL routing 14. What is the Python equivalent of PHP's array_merge?a) list.extend()b) list.append()c) list.merge()d) list.concat() 15. What is the output of the following code? x = [1, 2, 3] y = x y.append(4) z = x +y [1, 2, 3, 1,2,3,4][1, 2, 3, 4,1,2,3][1, 2, 3, 4,1,2,3,4][1, 2, 3, 4] 16. Which data structure follows the Last-In-First-Out (LIFO) principle?(a) Queue(b) Stack(c) Linked List(d) Tree 17. What is the primary purpose of a hash table?(a) Sorting data(b) Storing key-value pairs(c) Managing linked lists(d) Implementing trees 18. What is the main purpose of a B-tree?(a) Graph traversal(b) Database indexing(c) Memory allocation(d) String matching 19. Which data structure is best for implementing a priority queue?(a) Linked List(b) Binary Search Tree(c) Heap(d) Hash Table 20. What does the {% extends %} tag do in Django templates?(a) Includes a static file(b) Inherits from a parent template(c) Defines a custom filter(d) Creates a new view 21. How does one create a custom Django management command?(a) editing the settings.py file.(b) creating a file in the management/commands directory.(c) using Django admin tool.(d) modifying the urls.py file. 22. What is the purpose of the Django cache framework?(a) to manage database migrations.(b) to store static files.(c) to improve performance by storing frequently accessed data.(d) to handle form validation. 23. What is the purpose of the GROUP BY clause in SQL?(a) To filter rows(b) To sort rows(c) To combine rows from different tables(d) To aggregate data 24. Which class-based view in Django REST Framework is used for read-write model instances?(a) APIView(b) GenericAPIView(c) ModelViewSet(d) ViewSet 25. What is the primary purpose of a Django REST Framework Router?(a) To define database models(b) To automatically generate URL patterns for ViewSets(c) To handle authentication(d) To validate form data 26. What does the len() function return?(a) The data type of an object(b) The memory address of an object(c) The length of an object(d) The value of an object 27. What is the purpose of the with statement?(a) To handle exceptions(b) To manage resources(c) To define a loop(d) To create a function 28. What will be the output of the following code?nums = [1, 2, 3, 4] squared = list(map(lambda x: x**2 if x % 2 == 0 else x, nums)) print(squared)a) [1, 4, 3, 16]b) [1, 2, 3, 4]c) [1, 4, 9, 16]d) [1, 2, 3, 16] 29. How do you read a file in Python?(a) open().read()(b) file.read()(c) read.file()(d) file.open() 30. Which method removes and returns the last element from a list?(a) remove()(b) delete()(c) pop()(d) discard() Leave a Reply Cancel replyYour email address will not be published. Required fields are marked *Comment * Name * Email * Website Save my name, email, and website in this browser for the next time I comment.