Filter interviews by
Copy constructor creates a new object by copying the values of an existing object.
Copy constructor is used to create a new object with the same values as an existing object.
It is invoked when a new object is initialized with an existing object.
It is used to avoid shallow copy and ensure deep copy of objects.
Example: MyClass obj1; MyClass obj2 = obj1; //copy constructor called to create obj2
Vectors are dynamic arrays that allocate memory dynamically. They work by storing elements in contiguous memory locations.
Vectors allocate memory dynamically and store elements in contiguous memory locations
They can be resized dynamically as needed
Accessing elements is done using an index, similar to arrays
Inserting or deleting elements in the middle of a vector can be expensive as it requires shifting all subsequ...
Ordered map maintains the order of insertion while unordered map does not.
Ordered map is implemented using a balanced binary search tree while unordered map is implemented using a hash table.
Ordered map is useful when we need to maintain the order of insertion while unordered map is useful when we need faster access to elements.
Example of ordered map: std::map in C++, Example of unordered map: std::unordered_map i...
Name mangling is used by compilers to differentiate between different functions with the same signature.
Name mangling is a process of encoding/decoding function names to include additional information such as parameter types and namespaces.
This allows the compiler to differentiate between functions with the same name and signature.
For example, in C++, two functions with the same name and signature but in different...
Polymorphism is the ability of an object to take on many forms. It allows objects of different classes to be treated as if they were the same type.
Polymorphism is achieved through method overriding and method overloading.
Method overriding is when a subclass provides a specific implementation of a method that is already provided by its parent class.
Method overloading is when a class has two or more methods with the...
C++ program to find absolute difference between sum of diagonal elements
Create a 2D array
Calculate sum of diagonal elements
Calculate absolute difference
Print the result
Shallow copy creates a new object with the same reference as the original, while deep copy creates a new object with a new reference.
Shallow copy only copies the reference to the original object, so changes made to the copy will affect the original object.
Deep copy creates a new object with a new reference, so changes made to the copy will not affect the original object.
In Python, shallow copy can be made using th...
Check if a point is inside or outside a circle
Calculate the distance between the center of the circle and the given point using the distance formula
If the distance is less than the radius of the circle, the point is inside the circle
If the distance is equal to the radius of the circle, the point is on the circle
If the distance is greater than the radius of the circle, the point is outside the circle
Memory leaks occur when allocated memory is not released, leading to resource exhaustion. Proper management is essential.
Use smart pointers (e.g., std::unique_ptr, std::shared_ptr) in C++ to automatically manage memory.
In Java, ensure that references to unused objects are set to null to allow garbage collection.
Regularly use tools like Valgrind to detect memory leaks in C/C++ applications.
In languages like Python,...
Virtual functions enable polymorphism in C++, allowing derived classes to override base class methods.
Without virtual keyword: Base class method is called, even if derived class method exists.
With virtual keyword: Derived class method is called, enabling dynamic binding.
Example without virtual: Base class method 'show()' is called from a base class pointer.
Example with virtual: Derived class method 'show()' is cal...
I applied via Naukri.com and was interviewed in Jan 2023. There were 2 interview rounds.
Copy constructor creates a new object by copying the values of an existing object.
Copy constructor is used to create a new object with the same values as an existing object.
It is invoked when a new object is initialized with an existing object.
It is used to avoid shallow copy and ensure deep copy of objects.
Example: MyClass obj1; MyClass obj2 = obj1; //copy constructor called to create obj2
Shallow copy creates a new object with the same reference as the original, while deep copy creates a new object with a new reference.
Shallow copy only copies the reference to the original object, so changes made to the copy will affect the original object.
Deep copy creates a new object with a new reference, so changes made to the copy will not affect the original object.
In Python, shallow copy can be made using the cop...
Vectors are dynamic arrays that allocate memory dynamically. They work by storing elements in contiguous memory locations.
Vectors allocate memory dynamically and store elements in contiguous memory locations
They can be resized dynamically as needed
Accessing elements is done using an index, similar to arrays
Inserting or deleting elements in the middle of a vector can be expensive as it requires shifting all subsequent e...
STL provides various containers like vector, list, map, set, etc.
Vector: Dynamic array with contiguous memory allocation
List: Doubly linked list
Map: Associative container with key-value pairs
Set: Associative container with unique keys
Deque: Double-ended queue
Stack: LIFO data structure
Queue: FIFO data structure
Ordered map maintains the order of insertion while unordered map does not.
Ordered map is implemented using a balanced binary search tree while unordered map is implemented using a hash table.
Ordered map is useful when we need to maintain the order of insertion while unordered map is useful when we need faster access to elements.
Example of ordered map: std::map in C++, Example of unordered map: std::unordered_map in C++
Polymorphism is the ability of an object to take on many forms. It allows objects of different classes to be treated as if they were the same type.
Polymorphism is achieved through method overriding and method overloading.
Method overriding is when a subclass provides a specific implementation of a method that is already provided by its parent class.
Method overloading is when a class has two or more methods with the same...
Name mangling is used by compilers to differentiate between different functions with the same signature.
Name mangling is a process of encoding/decoding function names to include additional information such as parameter types and namespaces.
This allows the compiler to differentiate between functions with the same name and signature.
For example, in C++, two functions with the same name and signature but in different name...
C++ program to find absolute difference between sum of diagonal elements
Create a 2D array
Calculate sum of diagonal elements
Calculate absolute difference
Print the result
Virtual functions allow dynamic binding of functions at runtime. Vptr and Vtable are used to implement this feature.
Virtual functions are declared in base class and can be overridden in derived classes.
Vptr is a pointer to Vtable which contains addresses of virtual functions.
Virtual function is needed to achieve polymorphism and to allow derived classes to have their own implementation of a function.
Virtual functions a...
I am a software engineer with 5 years of experience in developing web applications and mobile apps.
Developed a web application for a healthcare company using React and Node.js
Built a mobile app for a retail company using React Native
Worked on a project for a financial institution using Java and Spring Framework
Experience in Agile methodology and Scrum framework
Strong skills in problem-solving and debugging
Memory leaks occur when allocated memory is not released, leading to resource exhaustion. Proper management is essential.
Use smart pointers (e.g., std::unique_ptr, std::shared_ptr) in C++ to automatically manage memory.
In Java, ensure that references to unused objects are set to null to allow garbage collection.
Regularly use tools like Valgrind to detect memory leaks in C/C++ applications.
In languages like Python, use ...
Virtual functions enable polymorphism in C++, allowing derived classes to override base class methods.
Without virtual keyword: Base class method is called, even if derived class method exists.
With virtual keyword: Derived class method is called, enabling dynamic binding.
Example without virtual: Base class method 'show()' is called from a base class pointer.
Example with virtual: Derived class method 'show()' is called f...
Check if a point is inside or outside a circle
Calculate the distance between the center of the circle and the given point using the distance formula
If the distance is less than the radius of the circle, the point is inside the circle
If the distance is equal to the radius of the circle, the point is on the circle
If the distance is greater than the radius of the circle, the point is outside the circle
Smart pointers are objects that manage the memory of dynamically allocated objects, preventing memory leaks and dangling pointers.
Smart pointers are a type of RAII (Resource Acquisition Is Initialization) technique.
They automatically delete the object they point to when it is no longer needed.
Examples of smart pointers include unique_ptr, shared_ptr, and weak_ptr in C++.
They are used to prevent memory leaks and danglin...
Top trending discussions
I applied via Naukri.com and was interviewed before May 2021. There were 4 interview rounds.
It was mixed like aptitude and from technical.
I applied via Approached by Company and was interviewed before Sep 2021. There were 2 interview rounds.
I applied via Naukri.com and was interviewed in May 2021. There were 3 interview rounds.
Java is a popular programming language used for developing various applications.
Java is an object-oriented language.
It is platform-independent and can run on any machine with a Java Virtual Machine (JVM).
Java is used for developing web applications, mobile applications, desktop applications, and more.
It has a vast library of pre-built classes and APIs that make development faster and easier.
Java is also used for develo...
I applied via Naukri.com and was interviewed in Dec 2020. There was 1 interview round.
Integration, middleware, and EAI systems are technologies that enable communication and data exchange between different software applications.
Integration involves connecting different software applications to enable data exchange and communication.
Middleware is software that sits between different applications and facilitates communication and data exchange.
EAI (Enterprise Application Integration) systems are a type of...
I applied via Campus Placement and was interviewed before Aug 2021. There were 4 interview rounds.
Coding cum aptitude test on Hackerrank
I applied via Naukri.com and was interviewed in Aug 2021. There was 1 interview round.
I applied via Naukri.com and was interviewed in Oct 2020. There were 3 interview rounds.
Yes, I can find other companies if terminated, leveraging my skills and network.
I have a strong professional network that I can tap into for job opportunities.
My skills in software engineering are in high demand, making it easier to find new roles.
I can utilize job platforms like LinkedIn and Glassdoor to identify openings.
I have experience in multiple industries, which broadens my job prospects.
I would communicate openly, seek feedback, and explore opportunities for growth during the contract period.
Communicate with HR to understand the situation and express my willingness to help in any capacity.
Request feedback on the client's concerns to identify areas for improvement.
Use the remaining time to upskill or work on personal projects that align with the company's goals.
Network with colleagues and explore inter...
I applied via Naukri.com and was interviewed in Jun 2021. There was 1 interview round.
Some of the top questions asked at the Altair Engineering Sde1 interview -
based on 1 interview experience
Difficulty level
Duration
Senior Software Engineer
70
salaries
| ₹14.7 L/yr - ₹27.4 L/yr |
Software Engineer
62
salaries
| ₹9.6 L/yr - ₹17.4 L/yr |
Software Development Engineer
33
salaries
| ₹12.2 L/yr - ₹20.5 L/yr |
Technical Specialist
25
salaries
| ₹12.6 L/yr - ₹36.2 L/yr |
Software Developer
23
salaries
| ₹9.1 L/yr - ₹15.3 L/yr |
AgreeYa Solutions
Apisero
Actalent Services
Cyber Infrastructure