Add office photos
Engaged Employer

Amdocs

3.8
based on 3.8k Reviews
Filter interviews by

100+ Namo Auto Agencies Interview Questions and Answers

Updated 11 Jan 2025
Popular Designations
Q1. First Unique Character in a String

You are given a string A consisting of lower case English letters. You have to find the first non-repeating character from each stream of characters.

For Example: If the given ...read more

View 4 more answers
Q2. PUZZLE

If I give you $ tablets which contain 2 for fever and 2 for cold given all 4 have same size shape and color and
you have to take 1 cold and 1 fever tablet how will you choose correctly?

Add your answer
Q3. Ways To Make Coin Change

You are given an infinite supply of coins of each of denominations D = {D0, D1, D2, D3, ...... Dn-1}. You need to figure out the total number of ways W, in which you can make a change fo...read more

View 5 more answers
Q4. Third greatest element

Given an array/list 'ARR' of ‘N’ distinct integers, you are supposed to find the third largest element in the given array 'ARR'.

Input Format :
The first line contains a single integer ‘T’...read more
View 3 more answers
Discover Namo Auto Agencies interview dos and don'ts from real experiences
Q5. First Unique Character in a String

You are given a string S of length N. Your task is to find the index(considering 1-based indexing) of the first unique character present in the string. If there are no unique c...read more

View 3 more answers
Q6. Cycle Detection in a Singly Linked List

You have given a Singly Linked List of integers, determine if it forms a cycle or not.

A cycle occurs when a node's next points back to a previous node in the list. The li...read more

View 4 more answers
Are these interview questions helpful?
Q7. Check If The String Is A Palindrome

You are given a string 'S'. Your task is to check whether the string is palindrome or not. For checking palindrome, consider alphabets and numbers only and ignore the symbols ...read more

View 3 more answers
Q8. Pythagorean triplet

You are given an array of n integers (a1, a2,....,an), you need to find if the array contains a pythagorean triplet or not.

An array is said to have a pythagorean triplet if there exists thre...read more

View 4 more answers
Share interview questions and help millions of jobseekers 🌟
Q9. Pythagorean Triplets

You are given an array of n integers (a1, a2,....,an), you need to find if the array contains a pythagorean triplet or not.

An array is said to have a pythagorean triplet if there exists thr...read more

View 4 more answers
Q10. Intersection of Linked List

You are given two Singly Linked List of integers, which are merging at some node of a third linked list.

Your task is to find the data of the node at which merging starts. If there is...read more

View 4 more answers
Q11. Nth Fibonacci Number

Nth term of Fibonacci series F(n), where F(n) is a function, is calculated using the following formula -

 F(n) = F(n-1) + F(n-2), Where, F(1) = F(2) = 1 

Provided N you have to find out the ...read more

View 4 more answers
Q12. Behavioral questions

Ans 1) Strength -> I believe that my greatest strength is the ability to solve problems quickly and efficiently, which makes me unique from others.
Ans 2) a) It is a semi -product based compa...read more

Add your answer
Q13. Subarray with equal occurrences

You have been given an array/list ARR of length N consisting of 0s and 1s only. Your task is to find the number of subarrays(non-empty) in which the number of 0s and 1s are equal....read more

View 3 more answers
Q14. Merge Sort

Given a sequence of numbers ‘ARR’. Your task is to return a sorted sequence of ‘ARR’ in non-descending order with help of the merge sort algorithm.

Example :

Merge Sort Algorithm - Merge sort is a Div...read more
View 3 more answers
Q15. Palindromic Substrings

You are given a string ‘S’. Your task is to return all distinct palindromic substrings of the given string in alphabetical order.

A string is said to be palindrome if the reverse of the st...read more

View 2 more answers
Q16. Anagram Pairs

Pre-requisites: Anagrams are defined as words or names that can be formed by rearranging letters of another word. Such as "spar" can be formed by rearranging letters of "rasp". Hence, "spar" and "r...read more

View 3 more answers
Q17. First Unique Character in a String

Given a string ‘STR’ consisting of lower case English letters, the task is to find the first non-repeating character in the string and return it. If it doesn’t exist, return ‘#...read more

View 3 more answers
Q18. Reverse Linked List

Given a singly linked list of integers. Your task is to return the head of the reversed linked list.

For example:
The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked lis...read more
View 6 more answers
Q19. Find Duplicates In Array

You are given an array/list 'ARR' consisting of N integers, which contains elements only in the range 0 to N - 1. Some of the elements may be repeated in 'ARR'. Your task is to find all ...read more

View 3 more answers
Q20. Find the fastest 3 horses

There are 25 horses among which you need to find out the fastest 3 horses. You can conduct race among at most 5 to find out their relative speed. At no point you can find out the actual...read more

Add your answer
Q21. Swap Two Numbers

Take two numbers as input and swap them and print the swapped values.

Input Format:
The first line of input contains a single integer 't', representing the total number of test cases. The second...read more
View 3 more answers

Q22. Puzzle:- you have two jars 3L and 5L and unlimited supply of water. How will you calculate 4L of water.

Ans.

To measure 4L of water using 3L and 5L jars, fill the 5L jar, pour 3L into the 3L jar, empty the 3L jar, and pour the remaining 2L from the 5L jar into the 3L jar. Finally, fill the 5L jar again and pour 1L into the 3L jar. Now, the 5L jar contains 4L of water.

  • Fill the 5L jar completely

  • Pour 3L from the 5L jar into the 3L jar

  • Empty the 3L jar

  • Pour the remaining 2L from the 5L jar into the 3L jar

  • Fill the 5L jar again

  • Pour 1L from the 5L jar into the 3L jar

Add your answer
Q23. DBMS Question

Table my_numbers contains many numbers in column num including duplicated ones. Can you write a SQL query to find the biggest number, which only appears once.

Add your answer
Q24. Minimum Spanning Tree

You are given an undirected, connected and weighted graph G(V, E), consisting of V number of vertices (numbered from 0 to V-1) and E number of edges.

Find and print the total weight of the ...read more

Add your answer
Q25. Maximum Points On Straight Line

You are given a 2-D plane, and some 'N' integer coordinates in the form of (X, Y), where 'X' is the x-coordinate and 'Y' is the y-coordinate, all of which lie on that plane. You n...read more

Add your answer
Q26. Check Integer Overflow

I had 2 integers which I had to multiply with each other and had to store the result in an integer only by handling the overflow condition.

View 4 more answers
Q27. OS Questions

1) Write command in the terminal to check the kernel version .
2) Check the system hardware in Linux .
3) What are the contents of /etc

Add your answer
Q28. DBMS Question

How to Take a Backup of a Table in MySQL?

Add your answer
Q29. DBMS Question

What is meant by normalization and denormalization?

Add your answer
Q30. Java Question

What is Serialization and Deserialization in Java ?

Add your answer
Q31. Detect Loop in Linked List

Check whether there exists a loop in the linked list or not.

View 5 more answers
Q32. OOPS Question

What is the difference between Overloading and Overriding?

Add your answer

Q33. What is singleton calss?Write a program to make a class singleton?

Ans.

Singleton class is a class that can only have one instance at a time.

  • It is used to control access to a shared resource or limit the instantiation of a class to one object.

  • To make a class singleton, make the constructor private and provide a static method to get the instance.

  • Example: public class Singleton { private static Singleton instance = new Singleton(); private Singleton() {} public static Singleton getInstance() { return instance; } }

Add your answer
Q34. OOPS Question

What is Pure Virtual function? Why we need it?

Add your answer
Q35. OOPS Question

What is Garbage collector in JAVA?

Add your answer

Q36. Challenges faced in your RPA experience and how you resolved it?

Ans.

Challenges faced in RPA experience and how resolved

  • One challenge was automating a process with multiple decision points, resolved by creating a decision tree

  • Another challenge was handling exceptions, resolved by implementing exception handling mechanisms

  • Integration with legacy systems was a challenge, resolved by creating custom connectors

  • Lack of standardization in input data was a challenge, resolved by implementing data validation and cleansing mechanisms

Add your answer
Q37. DBMS Question

What is views in SQL?

Add your answer

Q38. What is vptr and vptr table? how many instances of them are created and when?

Ans.

vptr stands for virtual pointer and vptr table is a table of function pointers used in polymorphism in C++.

  • vptr is a hidden member variable in C++ objects that points to the vptr table.

  • vptr table is a table of function pointers that maps virtual functions to their addresses.

  • Each object of a class with virtual functions has its own vptr and shares the same vptr table with other objects of the same class.

  • vptr and vptr table are created when an object of a class with virtual fun...read more

View 1 answer

Q39. What is serialization and Deserialization?write a program

Ans.

Serialization is the process of converting an object into a stream of bytes, while deserialization is the reverse process.

  • Serialization is used for data storage, transmission, and object persistence.

  • Deserialization is used to recreate the original object from the serialized data.

  • Examples of serialization formats include JSON, XML, and binary formats like Protocol Buffers and Apache Avro.

  • Serialization can also be used for deep copying objects.

  • Deserialization can be vulnerable ...read more

Add your answer
Q40. DBMS Question

Difference between the DELETE and TRUNCATE command in a DBMS.

Add your answer
Q41. OOPS Question

Difference between Constructor and Method?

Add your answer

Q42. Write a program to find duplicate elements in arraylist by min number of iterations?

Ans.

Program to find duplicate elements in arraylist with minimum iterations

  • Use HashSet to store unique elements and ArrayList to store duplicates

  • Iterate through the ArrayList only once

  • Use contains() method to check if element is already in HashSet

Add your answer
Q43. DBMS Question

What is Inner Join in SQL?

Add your answer

Q44. You have been given 9 balsa of same shape and size by using weighing scale you need to determine the heavy weight ball by weighing 3 times.

Ans.

Weigh 3 groups of 3 balls each, then weigh 2 heaviest balls from the heaviest group to find the heaviest ball.

  • Divide the 9 balls into 3 groups of 3 balls each.

  • Weigh the first 2 groups against each other.

  • If one group is heavier, weigh 2 balls from that group against each other to find the heaviest ball.

  • If both groups weigh the same, weigh the third group to find the heaviest group.

  • Weigh 2 heaviest balls from the heaviest group to find the heaviest ball.

Add your answer
Q45. OOPS Question

Explain Singleton Class in Java

Add your answer
Q46. OS Question

Print 1 to 100 using more than two threads.

Add your answer
Q47. OOPS Question

Explain SOLID principles in Object Oriented Design .

Add your answer
Q48. MCQ's

20 MCQ's were based on Java, C++, Linux, Operating systems, Database Management System.

Add your answer

Q49. Coding- String reversal and separation of vowel and consonants Swap two variables without using 3rd variable Pattern printing

Ans.

Answering coding questions on string reversal, variable swapping, and pattern printing.

  • For string reversal, use a loop to iterate through the string and append each character to a new string in reverse order.

  • To separate vowels and consonants, use a loop to iterate through the string and check if each character is a vowel or consonant.

  • To swap two variables without a third variable, use arithmetic operations or XOR bitwise operator.

  • For pattern printing, use nested loops to prin...read more

Add your answer

Q50. Why we use const reference in copy constructor?

Ans.

Const reference in copy constructor is used to avoid unnecessary object copying and improve performance.

  • Const reference allows us to pass objects by reference without modifying them.

  • Using const reference in copy constructor avoids creating a temporary copy of the object being passed.

  • It helps in preventing unnecessary memory allocation and improves performance.

  • Const reference ensures that the original object is not modified during the copy construction process.

View 1 answer

Q51. write a program to display pattern. output - 1 12 123 1234

Ans.

Program to display a pattern of numbers in a pyramid shape.

  • Use nested loops to print the numbers in the desired pattern.

  • The outer loop controls the number of rows and the inner loop prints the numbers in each row.

  • Use a variable to keep track of the number to be printed in each row.

  • Print a new line after each row is printed.

Add your answer

Q52. swaping of number using call by value , address and reference

Ans.

Swapping of numbers can be done using call by value, address and reference.

  • Call by value: Pass the values of variables as arguments to the function. Swap the values inside the function.

  • Call by address: Pass the addresses of variables as arguments to the function. Swap the values using pointers inside the function.

  • Call by reference: Pass the references of variables as arguments to the function. Swap the values using references inside the function.

Add your answer

Q53. how to create Back Up table in mysql?

Ans.

To create a backup table in MySQL, use the CREATE TABLE statement with SELECT INTO.

  • Use the CREATE TABLE statement with SELECT INTO to create a backup table.

  • Specify the name of the backup table and the name of the original table.

  • Use the SELECT INTO statement to copy the data from the original table to the backup table.

  • Example: CREATE TABLE backup_table SELECT * FROM original_table;

  • Make sure to regularly update the backup table to ensure data consistency.

Add your answer

Q54. Explain 4 words of OOPs. Encapsulation, Inheritance,Abstraction,Polymorphism

Ans.

OOPs concepts include Encapsulation, Inheritance, Abstraction, and Polymorphism.

  • Encapsulation: bundling of data and methods that operate on that data

  • Inheritance: creating new classes from existing ones

  • Abstraction: hiding implementation details and showing only necessary information

  • Polymorphism: ability of objects to take on multiple forms or behaviors

Add your answer

Q55. whats are the diffrent position properties of css ?

Ans.

CSS position properties are used to position elements on a web page.

  • The position property specifies the type of positioning method used for an element.

  • The top, bottom, left, and right properties are used to position the element.

  • The static, relative, absolute, fixed, and sticky values are used for the position property.

  • Static is the default value and elements are positioned according to the normal flow of the page.

  • Relative positions the element relative to its normal position....read more

Add your answer

Q56. What are the key concepts of Object-Oriented Programming (OOP)?

Ans.

Key concepts of OOP include encapsulation, inheritance, polymorphism, and abstraction.

  • Encapsulation: Bundling data and methods that operate on the data into a single unit (object).

  • Inheritance: Allowing a class to inherit properties and behavior from another class.

  • Polymorphism: Objects of different classes can be treated as objects of a common superclass.

  • Abstraction: Hiding complex implementation details and showing only the necessary features to the outside world.

Add your answer

Q57. What is the internal working mechanism of a HashMap?

Ans.

HashMap is a data structure that stores key-value pairs and uses hashing to quickly retrieve values based on keys.

  • HashMap internally uses an array of linked lists to store key-value pairs.

  • When a key-value pair is added, the key is hashed to determine the index in the array where the pair will be stored.

  • If multiple keys hash to the same index (collision), a linked list is used to store these pairs.

  • To retrieve a value, the key is hashed again to find the index and then the link...read more

Add your answer
Q58. SQL Question

Delete Duplicate Emails

Add your answer
Q59. OS Question

Explain Piping in Unix/Linux

Add your answer

Q60. write multi-threading program to print 1 2 1 2 using 2 thread.

Ans.

A multi-threading program to print 1 2 1 2 using 2 threads.

  • Create two threads and pass a flag to each thread to print either 1 or 2.

  • Use a synchronization mechanism like mutex or semaphore to ensure alternate printing.

  • Join the threads to wait for their completion.

Add your answer
Q61. Puzzle

Measure 4L using 3L and 5L cans .

Add your answer

Q62. What is multithreading and POSIX thread and its synchronisation .

Ans.

Multithreading is the ability of a CPU to execute multiple threads concurrently. POSIX thread is a standard for thread creation and management.

  • Multithreading allows multiple threads to run concurrently, improving performance and responsiveness.

  • POSIX thread (pthread) is a standard for creating and managing threads in Unix-based systems.

  • Thread synchronization is the coordination of threads to ensure that they do not interfere with each other's execution.

  • Mutexes, semaphores, and...read more

Add your answer

Q63. what is Garbage collector in java?

Ans.

Garbage collector in Java is an automatic memory management system that frees up memory by removing unused objects.

  • Garbage collector runs in the background and identifies objects that are no longer in use

  • It frees up memory by removing those unused objects

  • It helps prevent memory leaks and improves performance

  • Java provides different types of garbage collectors such as Serial, Parallel, CMS, and G1

  • Example: If an object is created but not used anymore, the garbage collector will ...read more

Add your answer

Q64. What is volatile keyword and its Real time use

Ans.

Volatile keyword is used to indicate that a variable's value can be changed unexpectedly.

  • It is used in multi-threaded programming to ensure that the value of a variable is always up-to-date and consistent across all threads.

  • It prevents the compiler from optimizing code that accesses the variable, ensuring that the variable is always read from memory and not from a cache.

  • Examples include hardware registers, shared memory, and global variables that can be accessed by multiple t...read more

Add your answer

Q65. write a program to reverse the string any language

Ans.

Program to reverse a string in any language

  • Create an empty string variable to store the reversed string

  • Loop through the original string from the end to the beginning

  • Append each character to the empty string variable

  • Return the reversed string

Add your answer

Q66. What is interfaces and demonstrate by example

Ans.

Interfaces in software development define a contract for classes to implement certain methods or properties.

  • Interfaces in programming are like blueprints that define the structure of a class.

  • Classes that implement an interface must provide definitions for all the methods and properties specified in the interface.

  • Interfaces allow for polymorphism and code reusability.

  • Example: An interface 'Shape' may have methods like 'calculateArea' and 'calculatePerimeter', which classes lik...read more

Add your answer

Q67. Tell me about different types of joins in SQL

Ans.

Different types of joins in SQL include inner join, left join, right join, and full outer join.

  • Inner join: Returns rows when there is a match in both tables.

  • Left join: Returns all rows from the left table and the matched rows from the right table.

  • Right join: Returns all rows from the right table and the matched rows from the left table.

  • Full outer join: Returns rows when there is a match in either table.

Add your answer

Q68. What is views in sql?

Ans.

Views in SQL are virtual tables that display data from one or more tables.

  • Views are created using SELECT statements.

  • They can be used to simplify complex queries.

  • They can also be used to restrict access to sensitive data.

  • Views do not store data themselves, but rather display data from other tables.

  • Example: CREATE VIEW myView AS SELECT * FROM myTable WHERE column = 'value';

Add your answer

Q69. Differentiate between null pointer and, dangling pointer

Ans.

Null pointer points to nothing, while dangling pointer points to memory that has been deallocated.

  • Null pointer is a pointer that does not point to any memory location.

  • Dangling pointer is a pointer that points to memory that has been deallocated.

  • Accessing a null pointer will result in a segmentation fault.

  • Accessing a dangling pointer can lead to unpredictable behavior or crashes.

  • Example: int* nullPtr = nullptr; int* danglingPtr = new int; delete danglingPtr; danglingPtr = null...read more

Add your answer

Q70. What would be your Expected CTC?

Ans.

My expected CTC would depend on the job role, company size, location, and benefits package.

  • Consider the job role and responsibilities when determining expected CTC.

  • Research industry standards and average salaries for similar positions.

  • Factor in the company size and location, as cost of living varies.

  • Take into account additional benefits such as healthcare, retirement plans, and bonuses.

  • Be prepared to negotiate based on your skills, experience, and market demand.

Add your answer

Q71. Difference between constructor and method?

Ans.

Constructor is used to initialize an object while method is used to perform an action on an object.

  • Constructor is called automatically when an object is created while method is called explicitly.

  • Constructor has the same name as the class while method has a unique name.

  • Constructor does not have a return type while method has a return type.

  • Example of constructor: public class Car { public Car() { //initialize variables } }

  • Example of method: public void startEngine() { //perform...read more

Add your answer

Q72. Program for reverse of string in minimum iteration

Ans.

Program to reverse a string in minimum iteration

  • Use two pointers, one at the start and one at the end of the string

  • Swap the characters at the two pointers and move the pointers towards each other

  • Repeat until the pointers meet in the middle of the string

Add your answer

Q73. What is process and its synchronisation

Ans.

Process is a program in execution. Synchronization is the coordination of multiple processes or threads.

  • Process is a program in execution that has its own memory space and resources.

  • Synchronization is the coordination of multiple processes or threads to ensure they do not interfere with each other.

  • Synchronization can be achieved through various mechanisms such as locks, semaphores, and monitors.

  • Examples of synchronization include ensuring only one thread accesses a shared res...read more

Add your answer

Q74. What is the architecture of Spring MVC?

Ans.

Spring MVC follows a Model-View-Controller architecture pattern for building web applications.

  • Spring MVC separates the application into three main components: Model, View, and Controller.

  • Model represents the data of the application and the business logic to manipulate the data.

  • View is responsible for rendering the data to the user interface.

  • Controller handles the user input, processes it, and interacts with the Model and View.

  • Spring MVC uses DispatcherServlet as the front con...read more

Add your answer

Q75. Design class diagram for Flower shop

Ans.

Design class diagram for Flower shop

  • Create a Flower class with attributes like name, color, price, etc.

  • Create a Bouquet class that has a list of Flower objects

  • Create a Customer class with attributes like name, address, phone number, etc.

  • Create an Order class that has a Customer object and a Bouquet object

  • Create a Payment class with attributes like payment method, amount, etc.

  • Create a Delivery class with attributes like delivery address, delivery date, etc.

Add your answer

Q76. Write a program to reverse link list?

Ans.

Program to reverse a linked list

  • Create a new empty linked list

  • Traverse the original linked list and insert each node at the beginning of the new list

  • Return the new reversed linked list

Add your answer

Q77. what are smart pointers

Ans.

Smart pointers are objects that manage the lifetime of dynamically allocated memory in C++.

  • Smart pointers automatically deallocate memory when it is no longer needed.

  • They prevent memory leaks and dangling pointers.

  • Examples of smart pointers in C++ are unique_ptr, shared_ptr, and weak_ptr.

View 1 answer

Q78. How redux work store, reducer and action

Ans.

Redux is a state management library for JavaScript applications.

  • Redux uses a single source of truth called the store to manage the application state.

  • Reducers are pure functions that specify how the state should change based on the actions dispatched.

  • Actions are plain JavaScript objects that describe the type of change to be made to the state.

  • When an action is dispatched, the store passes the current state and the action to the reducer, which returns the new state.

  • Redux follow...read more

Add your answer

Q79. Name any 3 annotations and how they work

Ans.

Annotations in Java are used to provide metadata about a program, which can be used by the compiler or at runtime.

  • 1. @Override - Indicates that a method overrides a method in its superclass.

  • 2. @Deprecated - Marks a method as deprecated, meaning it should no longer be used.

  • 3. @SuppressWarnings - Suppresses compiler warnings for a given part of the code.

Add your answer

Q80. Write the code to find next smallest palindrome.

Ans.

Code to find next smallest palindrome.

  • Iterate from middle to left and right, incrementing/decrementing digits to create palindrome

  • Handle edge cases like all 9s in number

  • Check if number is palindrome or not

Add your answer

Q81. write a code for binary search

Ans.

Code for binary search algorithm

  • Binary search is a divide and conquer algorithm

  • It works by repeatedly dividing the search interval in half

  • If the value is found, return the index. Else, repeat on the appropriate half

  • The array must be sorted beforehand

Add your answer

Q82. Difference between stringbuffer and stringbuilder?

Ans.

StringBuffer is synchronized and thread-safe, while StringBuilder is not synchronized.

  • StringBuffer is slower due to synchronization, while StringBuilder is faster.

  • StringBuffer is preferred in multithreaded environments, while StringBuilder is preferred in single-threaded environments.

  • Example: StringBuffer sb = new StringBuffer(); StringBuilder sb = new StringBuilder();

Add your answer

Q83. What is mutex and its systax

Ans.

Mutex is a synchronization object used to prevent multiple threads from accessing shared resources simultaneously.

  • Mutex stands for mutual exclusion.

  • It is used to protect shared resources from race conditions.

  • Mutex provides exclusive access to a shared resource.

  • Syntax: pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;

  • Example: pthread_mutex_lock(&mutex); // acquire lock

  • pthread_mutex_unlock(&mutex); // release lock

Add your answer

Q84. what is bug and unit testing?

Ans.

A bug is an error, flaw, failure, or fault in a computer program or system. Unit testing is a software testing method where individual units or components of a software are tested in isolation.

  • Bug is an error, flaw, failure, or fault in a computer program or system.

  • Unit testing is a software testing method where individual units or components of a software are tested in isolation.

  • Bug testing helps identify and fix issues in the software.

  • Unit testing ensures that each unit of ...read more

Add your answer

Q85. Real time use of synchronisation

Ans.

Synchronization is used to ensure consistency and avoid conflicts in real-time systems.

  • Real-time systems require synchronization to ensure that data is consistent and up-to-date across multiple devices or processes.

  • Synchronization can be achieved through various techniques such as locks, semaphores, and message passing.

  • Examples of real-time systems that use synchronization include stock trading platforms, online gaming, and traffic control systems.

Add your answer

Q86. what is SDLC AND TYPES?

Ans.

SDLC stands for Software Development Life Cycle. It is a process used by software developers to design, develop, and test software.

  • SDLC is a systematic process for building software applications.

  • There are different types of SDLC models such as Waterfall, Agile, Iterative, Spiral, etc.

  • Each type of SDLC model has its own set of advantages and disadvantages.

  • SDLC involves phases like planning, analysis, design, implementation, testing, and maintenance.

  • Example: Waterfall model fol...read more

Add your answer

Q87. What is a dangling pointer

Ans.

A dangling pointer is a pointer that points to a memory location that has been deallocated, leading to potential crashes or undefined behavior.

  • Dangling pointers can occur when memory is freed but the pointer is not set to NULL.

  • Accessing a dangling pointer can result in accessing invalid memory.

  • Example: int* ptr = new int; delete ptr; // ptr is now a dangling pointer

Add your answer

Q88. Design patterns examples

Ans.

Design patterns are reusable solutions to common software problems.

  • Creational patterns: Singleton, Factory, Abstract Factory

  • Structural patterns: Adapter, Decorator, Facade

  • Behavioral patterns: Observer, Strategy, Command

  • Examples: MVC, Dependency Injection, Template Method

Add your answer

Q89. reversal of nodes in linked list

Ans.

Reversing the nodes in a linked list involves changing the direction of pointers to go from the end to the beginning.

  • Iterate through the linked list and reverse the pointers to point to the previous node instead of the next node.

  • Use three pointers - prev, current, and next - to keep track of the nodes while reversing the list.

  • Update the head of the linked list to point to the last node after reversing.

Add your answer

Q90. Multithreading in java, data structures

Ans.

Multithreading and data structures are important concepts in Java programming.

  • Multithreading allows for concurrent execution of multiple threads within a single program.

  • Data structures are used to organize and manipulate data efficiently.

  • Examples of data structures include arrays, linked lists, stacks, and queues.

  • Java provides built-in support for multithreading through the Thread class and the Runnable interface.

  • Synchronization is important in multithreading to prevent race ...read more

Add your answer

Q91. Explain the concepts of OOPs in a code

Ans.

OOPs concepts include encapsulation, inheritance, polymorphism, and abstraction in code.

  • Encapsulation: Bundling data and methods that operate on the data into a single unit.

  • Inheritance: Allowing a new class to inherit properties and behavior from an existing class.

  • Polymorphism: Objects of different classes can be treated as objects of a common superclass.

  • Abstraction: Hiding the implementation details and showing only the necessary features of an object.

Add your answer

Q92. Design a singleton class

Ans.

A singleton class is a class that can only be instantiated once.

  • Ensure the constructor is private

  • Provide a static method to access the instance

  • Lazy initialization can be used to defer object creation

  • Thread safety should be considered

Add your answer

Q93. Program to reverse a linked list

Ans.

Program to reverse a linked list

  • Traverse the linked list and change the direction of pointers

  • Use three pointers to keep track of current, previous and next nodes

  • Handle edge cases like empty list or list with only one node

Add your answer

Q94. Take a json and perform CRUD operations

Ans.

Perform CRUD operations on a JSON object

  • Use POST method to create new data

  • Use GET method to read data

  • Use PUT method to update data

  • Use DELETE method to delete data

Add your answer

Q95. reverse the string

Ans.

Reverse a given string

  • Use a loop to iterate through the string and append each character to a new string in reverse order

  • Alternatively, use built-in string functions like reverse() or slice()

  • Remember to handle edge cases like empty strings or strings with only one character

Add your answer

Q96. What is springboot?

Ans.

Spring Boot is a Java-based framework used for creating standalone, production-grade Spring-based Applications.

  • Spring Boot simplifies the process of creating Spring applications by providing a set of default configurations.

  • It allows developers to quickly set up and run standalone Spring applications with minimal configuration.

  • Spring Boot includes embedded servers like Tomcat, Jetty, or Undertow, making it easy to deploy applications.

  • It promotes convention over configuration, ...read more

Add your answer

Q97. What is inheritance

Ans.

Inheritance is a concept in object-oriented programming where a class inherits properties and behaviors from another class.

  • Allows a class to inherit attributes and methods from another class

  • Promotes code reusability and reduces redundancy

  • Creates a parent-child relationship between classes

  • Derived class can override or extend the functionality of the base class

  • Example: Class 'Car' can inherit from class 'Vehicle' and inherit properties like 'speed' and methods like 'drive()'

Add your answer

Q98. console.log([] === []) ??

Ans.

No, they are not equal because they are two separate instances of arrays.

  • Empty arrays are two separate instances, so they are not strictly equal.

  • Comparing two empty arrays with strict equality will return false.

Add your answer

Q99. Design linked list

Ans.

Designing a linked list involves creating a data structure where each element points to the next one.

  • Define a Node class with a value and a next pointer

  • Create a LinkedList class with a head pointer

  • Implement methods to add, remove, and traverse nodes

  • Consider edge cases like adding to an empty list or removing the head node

Add your answer

Q100. Basics and features of Java 8

Ans.

Java 8 introduced new features like lambda expressions, streams, and functional interfaces.

  • Lambda expressions allow for more concise code by enabling functional-style programming.

  • Streams provide a way to work with collections of objects in a functional way.

  • Functional interfaces are interfaces with a single abstract method, used for lambda expressions.

  • Default methods allow interfaces to have method implementations.

  • Method references provide a way to refer to methods without inv...read more

Add your answer
1
2
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Namo Auto Agencies

based on 55 interviews in the last 1 year
3 Interview rounds
Technical Round 1
Technical Round 2
HR Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Developer Interview Questions from Similar Companies

4.2
 • 32 Interview Questions
3.9
 • 24 Interview Questions
3.4
 • 21 Interview Questions
4.3
 • 17 Interview Questions
3.6
 • 15 Interview Questions
3.5
 • 12 Interview Questions
View all
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
Get AmbitionBox app

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