NetApp
10+ Mahindra Automotives Interview Questions and Answers
Q1. What happens when we read from a NULL pointer?
Reading from a NULL pointer results in undefined behavior and can cause a segmentation fault.
Dereferencing a NULL pointer can lead to crashes or unexpected behavior.
It is important to always check if a pointer is NULL before using it.
Examples of undefined behavior include accessing memory that doesn't belong to the program or overwriting important data.
Segmentation faults occur when a program tries to access memory it doesn't have permission to access.
Q2. What is TCP/UDP ? Explain the differences & their aplications?
TCP/UDP are transport layer protocols used for communication between devices on a network.
TCP (Transmission Control Protocol) is a reliable, connection-oriented protocol that ensures data is delivered error-free and in order. It is used for applications that require high reliability such as email, file transfer, and web browsing.
UDP (User Datagram Protocol) is a connectionless protocol that does not guarantee delivery or order of data. It is used for applications that require...read more
Q3. Print the path of a node from root and also the reverse path i.e from the node to the root
Print the path of a node from root and also the reverse path i.e from the node to the root
Traverse the tree from root to node and store the path in an array
Reverse the array to get the reverse path
Print both paths
Use recursion for traversal
Q4. )i give u a 512 mb ram. wat will be there in it??
512 MB RAM is a computer memory module that can store and retrieve data quickly.
512 MB RAM is a type of computer memory module.
It can store and retrieve data quickly.
It is a relatively small amount of memory compared to modern standards.
It may be suitable for basic computing tasks such as web browsing and word processing.
It may struggle with more demanding applications such as gaming or video editing.
Q5. What are the phases of compilation?
Phases of compilation include preprocessing, compilation, assembly, and linking.
Preprocessing: expands macros and includes header files
Compilation: translates source code to assembly language
Assembly: translates assembly code to machine code
Linking: combines object files and libraries into an executable
Examples: gcc, clang, javac
Q6. Linked list reversal,finding the depth of tree
Reversing a linked list and finding the depth of a tree are common data structure problems.
To reverse a linked list, iterate through the list and change the pointers to point to the previous node.
To find the depth of a tree, recursively traverse the tree and keep track of the maximum depth reached.
Both problems can be solved using recursion or iteration.
In the case of linked list reversal, be careful to update the head pointer to point to the new first node.
Q7. Do you have any queries?
Yes, I have a few queries.
Can you provide more information about the company culture?
What are the opportunities for growth within the company?
Can you explain the benefits package in more detail?
Q8. Read from a large file and print the count of each word
Q9. Write a C function for strstr?
strstr function searches for the first occurrence of a substring in a given string.
The function takes two arguments: the main string and the substring to be searched.
It returns a pointer to the first occurrence of the substring in the main string.
If the substring is not found, it returns NULL.
The function is case-sensitive.
Example: strstr('hello world', 'world') returns 'world'.
Q10. Explain CSMA/CD protocol?
CSMA/CD is a protocol used in Ethernet networks to avoid data collisions.
CSMA/CD stands for Carrier Sense Multiple Access with Collision Detection.
Before transmitting data, a device listens to the network to check if it's free.
If the network is busy, the device waits for a random amount of time before trying again.
If two devices transmit data at the same time, a collision occurs and both devices stop transmitting.
After a collision, each device waits for a random amount of tim...read more
Q11. Explain system stack?
System stack is a data structure used by computer programs to store information about the active subroutines and function calls.
System stack is also known as call stack or execution stack.
It is a LIFO (Last In First Out) data structure.
Each time a function is called, its return address and local variables are pushed onto the stack.
When the function returns, the values are popped off the stack.
Stack overflow can occur when the stack size exceeds its limit.
Debuggers use the sys...read more
Q12. Why Netapp?
Q13. Ideal working environment?
An ideal working environment for me is one that promotes collaboration, creativity, and work-life balance.
Open communication and teamwork among colleagues
Flexible work hours or remote work options
Supportive and inclusive company culture
Access to necessary resources and tools for productivity
Comfortable and well-designed workspace
Opportunities for professional growth and development
Q14. Snapshot technology ?
Snapshot technology is a feature that captures the current state of a system or application at a specific point in time.
Snapshots can be used for debugging and troubleshooting purposes.
They allow developers to examine the state of the system at a specific point in time.
Snapshots can be taken manually or automatically.
Examples of snapshot technology include virtual machine snapshots and database snapshots.
Q15. Binary search algorithm
Top HR Questions asked in Mahindra Automotives
Interview Process at Mahindra Automotives
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month