Add office photos
Employer?
Claim Account for FREE

Elektrobit Automotive India

4.0
based on 14 Reviews
Filter interviews by

Tech Mahindra Foundation Interview Questions and Answers

Updated 5 Feb 2024

Q1. Write an ISR with Accepts an Int arguement and Returns an int value

Ans.

An ISR that accepts an int argument and returns an int value.

  • An ISR (Interrupt Service Routine) is a function that is executed in response to an interrupt.

  • The ISR should have a return type of int and accept an int argument.

  • The ISR can perform any necessary operations and return an int value.

  • Here's an example of an ISR in C language: int myISR(int arg) { // code goes here }

View 1 answer

Q2. what is RAM and ROM explain the difference.

Ans.

RAM and ROM are types of computer memory. RAM is volatile and used for temporary storage, while ROM is non-volatile and used for permanent storage.

  • RAM stands for Random Access Memory and is used for temporary storage of data and programs while the computer is running.

  • ROM stands for Read-Only Memory and is used for permanent storage of data and programs that cannot be changed.

  • RAM is volatile, meaning that its contents are lost when the computer is turned off, while ROM is non-...read more

Add your answer

Q3. What is the difference between STRUCTURE AND union

Ans.

Structure is a user-defined data type that groups related variables of different data types. Union is a data type that allows storing different data types in the same memory location.

  • Structure allocates memory for all its members separately.

  • Union allocates memory for only one member at a time.

  • Structure is used when all members need to be accessed at the same time.

  • Union is used when only one member needs to be accessed at a time.

  • Structure is larger in size than union.

  • Union is ...read more

Add your answer
Ans.

A stack is a data structure that follows the Last-In-First-Out (LIFO) principle.

  • Elements are added and removed from the top of the stack.

  • Common operations include push (add element), pop (remove element), and peek (access top element).

  • Stacks can be implemented using arrays or linked lists.

  • Example: Undo/Redo functionality in a text editor.

View 1 answer
Discover Tech Mahindra Foundation interview dos and don'ts from real experiences

Q5. Conditon for Stack overflow

Ans.

Stack overflow occurs when the call stack exceeds its maximum limit.

  • Stack overflow happens when a function calls itself indefinitely, causing the call stack to fill up.

  • It can also occur when a function recursively calls other functions, causing the call stack to exceed its limit.

  • Stack overflow can be prevented by optimizing recursive functions or increasing the maximum stack size.

View 1 answer

Q6. Explain Maskable Interrupts

Ans.

Maskable interrupts are interrupts that can be disabled or enabled by the programmer.

  • Maskable interrupts can be controlled by setting or clearing bits in a register.

  • They can be used to prioritize interrupts and prevent lower priority interrupts from interrupting higher priority ones.

  • Examples of maskable interrupts include keyboard interrupts and timer interrupts.

  • Maskable interrupts are different from non-maskable interrupts, which cannot be disabled by the programmer.

Add your answer

Q7. Explain Interrupts

Ans.

Interrupts are signals that temporarily halt the CPU's current task to execute a higher priority task.

  • Interrupts are used to handle events that require immediate attention

  • They can be hardware or software generated

  • Interrupts have a priority level that determines which one is executed first

  • Examples include keyboard input, mouse movement, and system calls

Add your answer

Q8. explain volatile

Ans.

Volatile is a keyword in programming that indicates a variable's value can change at any time.

  • Volatile is used to declare variables whose values can be changed by external factors.

  • It is commonly used in multi-threaded programming to ensure that the latest value of a variable is always used.

  • Volatile variables are not optimized by the compiler and are always read from memory.

  • Examples of volatile variables include hardware registers and shared memory locations.

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

Top Interview Questions from Similar Companies

4.4
 • 450 Interview Questions
4.2
 • 334 Interview Questions
3.9
 • 245 Interview Questions
3.6
 • 184 Interview Questions
4.2
 • 177 Interview Questions
4.1
 • 161 Interview Questions
View all
Top Elektrobit Automotive India Interview Questions And Answers
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
75 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