Add office photos
Engaged Employer

Synopsys

3.9
based on 344 Reviews
Filter interviews by

Modi Motors Agencies Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. What are semaphores, differnce between them, Different OSI layers , deadlock protocols, ACID protocols in dbms

Ans.

Semaphores, OSI layers, deadlock and ACID protocols in DBMS

  • Semaphores are used for process synchronization and communication

  • OSI model has 7 layers: Physical, Data Link, Network, Transport, Session, Presentation, Application

  • Deadlock protocols prevent processes from entering a deadlock state

  • ACID protocols ensure database transactions are reliable and consistent

Add your answer

Q2. What is the differnce between linear and non linear data structure?

Ans.

Linear data structures have a sequential arrangement of elements while non-linear data structures have a hierarchical arrangement.

  • Linear data structures have a fixed number of elements and are easy to traverse.

  • Non-linear data structures have an arbitrary number of elements and are difficult to traverse.

  • Arrays, linked lists, and stacks are examples of linear data structures.

  • Trees, graphs, and heaps are examples of non-linear data structures.

Add your answer

Q3. What is the differnce between c and c++?

Ans.

C++ is an extension of C with object-oriented programming features.

  • C++ supports classes and objects while C does not.

  • C++ has better support for polymorphism and inheritance.

  • C++ has a standard template library (STL) for data structures and algorithms.

  • C++ allows function overloading while C does not.

  • C++ has exception handling while C does not.

Add your answer

Q4. Steps associated with client server connnection request?

Ans.

Steps for client server connection request.

  • Client sends a connection request to the server.

  • Server receives the request and sends a response.

  • Client receives the response and establishes a connection.

  • Connection is maintained until terminated by either party.

Add your answer
Discover Modi Motors Agencies interview dos and don'ts from real experiences

Q5. Find the boundary traversal of a binary tree?

Ans.

Boundary traversal of a binary tree is the process of visiting the nodes on the boundary of the tree.

  • Start with the root node and traverse the left boundary nodes from top to bottom.

  • Traverse the leaf nodes from left to right.

  • Traverse the right boundary nodes from bottom to top.

  • Exclude the leaf nodes that are already traversed in the second step.

  • Repeat the above steps for all the subtrees of the binary tree.

Add your answer

Q6. Find the left view of a binary tree?

Ans.

The left view of a binary tree shows the nodes that are visible when the tree is viewed from the left side.

  • Traverse the tree recursively from left to right

  • Print the first node encountered at each level

  • Example: For tree with root node A, left view is A, B, D, G

Add your answer

Q7. FInd the middle of the linked list?

Ans.

To find the middle of a linked list, use two pointers - one moving at twice the speed of the other.

  • Use two pointers - slow and fast

  • Slow pointer moves one node at a time, fast pointer moves two nodes at a time

  • When fast pointer reaches the end, slow pointer will be at the middle

Add your answer

Q8. difference between process and threads?

Ans.

Processes are independent programs while threads are lightweight processes within a program.

  • Processes have their own memory space while threads share memory space.

  • Processes communicate through inter-process communication while threads communicate directly.

  • Processes are slower to create and terminate than threads.

  • Examples of processes are web browsers, word processors, etc. while examples of threads are spell checkers, print spoolers, etc.

Add your answer

Q9. Producer and consumer problem?

Ans.

Producer and consumer problem is a synchronization problem in computer science where multiple processes share a common resource.

  • It occurs when multiple processes try to access a shared resource simultaneously.

  • The producer produces data and the consumer consumes it.

  • The problem is to ensure that the producer does not produce data when the buffer is full and the consumer does not consume data when the buffer is empty.

  • Examples include printing documents, reading and writing files...read more

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter