Iris Software
ATS Share Brokers Interview Questions and Answers
Q1. Print greater number using lambda function
Use lambda function to print greater number
Define a lambda function that takes two parameters
Use the max() function inside the lambda to compare the two numbers
Call the lambda function with two numbers to print the greater one
Q2. Print 1-10 using 2 threads, in correct order
Use two threads to print numbers 1-10 in correct order
Create two threads, one for printing odd numbers and one for printing even numbers
Use synchronization mechanisms like mutex or semaphore to ensure correct order
Example: Thread 1 prints 1, 3, 5, 7, 9 and Thread 2 prints 2, 4, 6, 8, 10
Q3. Code for Fibonacci series -- both iterative and recursive
Fibonacci series code in iterative and recursive methods
Iterative method: Use a loop to calculate Fibonacci numbers
Recursive method: Define a function that calls itself to calculate Fibonacci numbers
Example for iterative method: int fib(int n) { int a = 0, b = 1, c; for(int i = 2; i <= n; i++) { c = a + b; a = b; b = c; } return b; }
Example for recursive method: int fib(int n) { if(n <= 1) return n; return fib(n-1) + fib(n-2); }
Q4. What is call stack and event loop in JavaScript?
Call stack is a data structure that stores function calls in JavaScript, while event loop manages asynchronous operations.
Call stack is a mechanism for managing function invocation in JavaScript.
Functions are added to the call stack when they are invoked and removed when they are completed.
Event loop is responsible for handling asynchronous operations in JavaScript.
Event loop continuously checks the call stack and the callback queue to determine if there are any tasks to be e...read more
Q5. How Transaction propagation works in Hibernate?
Transaction propagation in Hibernate allows the management of multiple database operations within a single transaction.
Hibernate supports different transaction propagation modes such as REQUIRED, REQUIRES_NEW, SUPPORTS, MANDATORY, NOT_SUPPORTED, and NEVER.
The propagation mode determines how the transaction should be handled when a method is called within an existing transaction.
REQUIRED is the default propagation mode, where if a transaction exists, the method will join it, o...read more
Q6. Explain OOPs concepts
OOPs concepts refer to Object-Oriented Programming principles like inheritance, encapsulation, polymorphism, and abstraction.
Inheritance: Allows a class to inherit properties and behavior from another class.
Encapsulation: Bundling data and methods that operate on the data into a single unit.
Polymorphism: Ability to present the same interface for different data types.
Abstraction: Hiding the complex implementation details and showing only the necessary features.
Q7. How to do Unit testing in C++
Unit testing in C++ involves writing test cases for individual units of code to ensure they work as expected.
Use a unit testing framework like Google Test or Catch2 to write and run test cases
Create separate test files for each unit of code being tested
Use assertions to check the expected behavior of the code under test
Mock dependencies or use dependency injection to isolate units for testing
Run tests regularly to catch regressions and ensure code quality
Q8. Difference between promise vs observables?
Promises are used for a single async operation while observables are used for multiple async operations and can be cancelled.
Promises are eager, meaning they start immediately upon creation.
Observables are lazy, meaning they only start when subscribed to.
Promises can only handle a single value or error, while observables can handle multiple values over time.
Observables can be cancelled, while promises cannot.
Promises are part of ES6, while observables are part of RxJS library...read more
Q9. Describe Spring MVC.
Spring MVC is a framework for building web applications in Java.
Spring MVC is a part of the Spring Framework, which provides a model-view-controller architecture for developing web applications.
It follows the MVC design pattern, where the model represents the data, the view represents the user interface, and the controller handles the requests and manages the flow of data.
It provides features like request mapping, data binding, validation, and view resolution.
Example: In a Sp...read more
More about working at Iris Software
Interview Process at ATS Share Brokers
Top Technical Lead Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month