Altair Engineering
20+ Interview Questions and Answers
Q1. Given one point and circle how will you find if it's inside circle or outside circle
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
Q2. how compiler differentiate between different function with same signature. Name mangling
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 namespaces will have different mangled names.
Name mangling is ...read more
Q3. What's Copy Constructor and how and why it is used
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
Q4. What's smart pointers Which IDE you use Have you used GDB?
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 dangling pointers.
I use Visual Studio Code as my IDE.
Yes, I have ...read more
Q5. What's difference between ordered map and unordered map
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++
Q6. How does virtual function works. What's Vptr and Vtable. Why virtual function is needed
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 are resolved at runtime based on the object type rather tha...read more
Q7. Write C++ program to find absolute difference between sum of diagonal elements
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
Q8. what's' polymorphism and how it works
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 but different parameters.
Polymorphism allows for mor...read more
Q9. What's shallow and deep copy
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 copy() method, while deep copy can be made using the deepcopy...read more
Q10. How vector works internally
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 elements
Vectors have a size and capacity, where size is the...read more
Q11. What is the difference between static and dynamic analysis?
Static analysis is done without executing the code while dynamic analysis is done during code execution.
Static analysis is done by analyzing the code without executing it
Dynamic analysis is done by analyzing the code during its execution
Static analysis is usually done before the code is compiled or executed
Dynamic analysis is usually done after the code is compiled or executed
Static analysis can detect potential issues in the code
Dynamic analysis can detect actual issues in t...read more
Q12. Different containers in STL
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
Q13. What are the four pillars OOPS?
The four pillars of OOPS are Abstraction, Encapsulation, Inheritance, and Polymorphism.
Abstraction: Hiding implementation details and showing only necessary information.
Encapsulation: Binding data and functions together and restricting access to them.
Inheritance: Creating new classes from existing ones, inheriting properties and methods.
Polymorphism: Ability of objects to take on multiple forms and perform different actions based on context.
Q14. What is dof for 1d 2d and 3d element
DOF stands for Degrees of Freedom and refers to the number of independent variables in an element.
1D elements have 2 DOF, typically displacement in x and rotation about x
2D elements have 3 DOF, typically displacement in x and y, and rotation about z
3D elements have 6 DOF, typically displacement in x, y, and z, and rotation about x, y, and z
Q15. What fea solvers have you used before
I have used various fea solvers in my previous roles.
ANSYS
ABAQUS
Nastran
LS-DYNA
OpenFOAM
Q16. Find repeated nos in arrays
Find repeated numbers in arrays of strings
Iterate through each string in the array
Convert each string to an array of numbers
Use a hash map to track the frequency of each number
Identify and return the repeated numbers
Q17. What is modal analysis
Modal analysis is a technique used to study the dynamic characteristics of a system by identifying its modes of vibration.
Modal analysis is used to determine the natural frequencies, damping ratios, and mode shapes of a structure or component.
It helps in understanding the behavior of a system under different loading conditions.
Modal analysis is commonly used in engineering fields such as aerospace, civil, and mechanical engineering.
It involves experimental methods like impact...read more
Q18. sql joins and types of joins
SQL joins are used to combine rows from two or more tables based on a related column between them.
Types of joins include INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN.
INNER JOIN returns rows when there is at least one 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 JOIN returns rows when there is a match in one of the ...read more
Q19. What is Singleton and implement it.
Singleton is a design pattern that restricts the instantiation of a class to one object.
Singleton pattern ensures that a class has only one instance and provides a global point of access to it.
Commonly used in scenarios where only a single instance of a class is needed, such as database connections or logging.
Implementation involves a private constructor, a static method to access the instance, and a static variable to hold the instance.
Example: public class Singleton { priva...read more
Q20. Mesh quality criteria
Mesh quality criteria are used to evaluate the accuracy and reliability of a mesh in numerical simulations.
Mesh quality criteria assess the shape, size, and connectivity of mesh elements.
Common criteria include aspect ratio, skewness, and orthogonality.
Aspect ratio measures the elongation of elements, with lower values indicating better quality.
Skewness measures the distortion of elements, with values close to zero indicating better quality.
Orthogonality measures the angle be...read more
Q21. How to connect to backend
To connect to the backend, you can use APIs, database connections, or web services.
Use APIs to send and receive data between the frontend and backend
Establish database connections to retrieve and store data
Utilize web services for communication between different systems
Q22. Implement Infinite scroll on the page
Implementing infinite scroll on a webpage
Use JavaScript to detect when user reaches the bottom of the page
Fetch more content using AJAX calls
Append new content to the existing page dynamically
Q23. Implement meshing on a box.
Meshing on a box involves creating a network of interconnected vertices, edges, and faces on the surface of the box.
Identify the vertices, edges, and faces of the box
Create a mesh by connecting the vertices with edges and forming faces
Ensure the mesh is well-structured and follows the desired pattern
Consider using algorithms like Delaunay triangulation or marching cubes for mesh generation
Top HR Questions asked in null
Interview Process at null
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month