Embedded Interview Questions asked by Interviewer


EMBEDDED INTERVIEW QUESTION


I have concentrated mostly on embedded software and even I did not consider PCB Layout, Hardware design engineering positions.
I will also update few more questions on analog and digital electronics.
C & C Puzzles
1.     C Vs Embedded C vs C++ What is the difference between C and embedded C?
2.     C compilation steps
3.     Know about “static, global/extern, auto, register, const and volatile” very well. When do you use static keyword for a global variable?
4.     Use of volatile keyword?
5.     Know about “structure, union and enum”.
6.     What is the difference between Structure and union? Where do we use union? Structs and Unions and their paddings.
7.     Know about basic pointers concepts. Double Pointers. Pointer aliasing, Multiple indirection.
8.     Function pointers and Callback functions
9.     Char ptr, int ptr & their sizes? pointer aliasing.
10.  Null ptr, void ptr and their uses?
11.  malloc vs calloc vs realloc.
12.  File operations in linux
13.  Typecasting
14.  Inline function. Difference between Inline and macro.
15.  Preprocessor directives.
16.  Bit manipulation - Set, Get, Clear, Toggle, Shift, Display Bits
17.  Bit Fields in C
18.  Difference between heap and stack? Write a function to figure out if stack grows up or down.
19.  Memory leak
C Program to
1.     Reverse bits in a number.
2.     Count the number of set bits in a byte/word/dword/qword
3.     Swap nibbles in a byte
4.     Reverse a string.
5.     Print the diagonal elements of a matrix.
6.     Strip whitespace from a string in-place.
7.     Remove duplicate chars from a string ("AAA BBB" -> "A B")
8.     Find the first non-repeating character in a string ("ABCA" -> B)
9.     Dynamic Memory allocation of a 2D array
10.  Transpose of a Matrix
11.  Different ways of swapping two numbers.
12.  Find size of a data type without sizeof operator.
13.  Find little endian or big endian.
14.  prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz".
Data structures
1.     Linked List and its flavors
2.     Stack – implementation using arrays and linked list
3.     Queue – implementation using arrays and linked list
4.     Implement the following functions for a binary tree:
 Insert
 PrintInOrder
 PrintPreOrder
 PrintPostOrder
 Implement a non-recursive PrintInOrder
Algorithms
1.     Know about Time and Space Complexity of basic algorithms
2.     Sorting and Searching algorithms.
3.     Reverse a linked list, circular linked list
4.     To find factorial with and without recursion.
5.     To identify the Pythagoras triangle.
6.     To identify palindrome.
7.     To generate Fibonacci sequence.
8.     Find if a linked list has a cycle in it. Now do it without marking nodes (detect loop in linked list)
9.     Find the middle of a linked list. Now do it while only going through the list once (same solution as finding cycles)
Computer Architecture – Microprocessor, Microcontrollers (8051), ARM, DSP and other SoC peripherals / Controllers
1.     CISC Vs RISC
2.     Harvard vs Von Neuman Architecture
3.     Flynn’s Taxonomy
4.     DMA VS Polling vs Interrupts
5.     I/O mapped I/O vs Memory Mapped I/O
6.     Virtual Memory
7.     Pipeline
8.     Instruction Level Parallelism, Thread Level Parallelism.
9.     Superscalar Architecture, VLIW Architecture, EPIC Architecture, SMT and Multi-core
10.  RAM Vs ROM
11.  Various Addressing modes in 8086
12.  What are interrupts? Types of interrupts?
13.  What is ISR?
14.  What is return type of ISR?
15.  Can we use any function inside ISR?
16.  Can we use printf inside ISR?
17.  Can we put breakpoint inside ISR?
18.  What is interrupt latency?
19.  Types of Cache mapping.
20.  what is Snooping Cache?
21.  Watchdog Timer
22.  Brown out Reset (COP Timer), Power On Reset
23.  DRAM/ SDRAM Controller
24.  e-Flash Controller
25.  Interrupt Controller
26.  Timers
27.  DMA Controller
Operating System/ Real Time Concepts
1.     When do you need an OS?
2.     When do you need a RTOS?
3.     RTOS VS Time Shared OS?
4.     Give some examples of GPOS and RTOS.
5.     Soft real-time vs Hard real-time
6.     What is Real time and what is RTOS?
7.     Difference between various kernels. monolithic kernel, micro kernel, nano kernel, exo kernel, hybrid kernel, resource kernel.
8.     What is priority inversion? Why priority inversion occurs and solutions for it?
9.     What is priority inheritance?
10.  Process vs threads
11.  IPC mechanisms
12.  Threads- Mutex, semaphore, conditional variables
13.  Preemptive vs Non preemptive Scheduling
14.  What is scheduling? And its types?
15.  What is priority scheduling?
16.  What is super loop?
17.  Process states
18.  Demand paging
19.  Kernel
20.  Thread
21.  What are device-drivers?
22.  What are interrupts?
23.  What are short-term, medium-term and Long-term Schedulers?
24.  What is SMP (Shared Multi-Processing)?
25.  What is context switch?
26.  What are the information in the PCB?
27.  Cpu Bound vs I/O Bound?
28.  Memory layout of a process
29.  Multithreads
30.  Deadlock?
31.  Conditions for deadlock?
32.  Detecting and avoiding deadlocks?
33.  Livelock?
34.  Spinlock?
35.  Race Condition?
36.  Semaphores?
37.  Mutex?
38.  Binary semaphore vs Count semaphore
39.  Semaphore vs Mutex
40.  Difference between Mutexes and Critical Sections?
 What are Reentrant Locks? Implement a Reentrant Lock with Mutexes.
41.  Paging
42.  Segmentation
43.  Swapping
44.  Fragmentation
45.  Thrashing
46.  What is Top half & bottom half of a kernel?
Linux Concepts
1.     Linux commands
2.     What are different types of shell and why bash?
3.     POSIX API. How pthreads are different from RTOS threads?
Communication / DSP / Networking Concepts
1.     Sampling, sampling period & sampling rate
2.     cut-off frequency
3.     Frequency bandwidth
4.     Nyquist theorem
5.     Aliasing and Anti-aliasing
6.     Signal to Noise Ratio
7.     Truncation/ rounding
8.     Convolution
9.     Correlation
10.  FFT
11.  FIR, IIR Filters
12.  OSI Layers
13.  TCP/IP Layers
14.  Difference between TCP and UDP? When would you want to use one over the other?
15.  Piggybacking
16.  ARP
17.  DHCP
18.  Other basic concepts of Communication
Short range Wireless & On-Chip/Board Communication Protocols
1.     I2C
2.     SPI
3.     CAN
4.     LIN
5.     UART
6.     Bluetooth(Bluetooth Low Energy)
7.     Ethernet
8.     IEEE 802.11
9.     ZigBee
10.  PCI
11.  LORA
12.  Zwave
13.  LTE
Analog & Digital Design Concepts – FPGA/ASIC
1.     Significance of 32.768KHz frequency as clock source?
2.     Different Flip flops, Counters.
3.     Sequential Circuit, Combinational Circuit.
4.     Binary to Octal, Hexadecimal Conversion.
5.     What are Fan in and Fan out?
6.     What is Tristate logic?
7.     What are error levels?
8.     Transition times in gate?
9.     MUX, DEMUX, Encoder, Decoder
10.  Implement some cicuit with transistor and basic opamp concepts.
11.  Frequency divider circuit.
12.  Draw 200Hz waveform and then draw 50 Hz wave form wid ref to 200Hz.
13.  VLSI Design Flow
14.  DAC
15.  PWM
16.  ADC - Bit resolution during conversion.
17.  PLL, Op-Amps, Analog MUX.
18.  Designing basic gates using NMOS and PMOS.
19.  Draw current gain amplifier using BJT and MOSFET.
General
1.     Questions from your project. How did you connect that particular sensor to the board? Any protocol? Clock frequency of the used controller? pinouts of the sensors?
2.     Why did you choose that controller for your project and why not the other one?
3.     How will you debug a program?
4.     What to do if your software in the SoC hangs?
5.     Use of JTAG?
6.     In-System Programming?
7.     How do you use Oscilloscope, Logic Analyzer, Spectrum Analyser, CANanalyzer?
8.     Difference between a BIOS and UEFI boot process?
9.     Difference between a PC Boot and Smartphone boot?
10.  Writing portable code in C.
11.  How do you make inline assembly code in C?
12.  Explain how shared memory works? (A good candidate will know details like why pointers are stored as offsets and how to protect memory regions using semaphores. )
13.  What happens on a system call? (A good answer will include a description of processor interrupts and how the hardware handles them, scheduling decisions, marshaling parameters, etc. (For embedded programmers a question dealing with concurrent operations can be substituted.)
14.  How would you read in a string of unknown length without risking buffer overflow?
15.  What is ABI/API?
If you want to impress the interviewer, try writing two solutions for C puzzles. 1. Most obvious and simple solution and 2. Obfuscated C code
Before you search for the answers, just hit the upvote. Thanks.
Best of luck !!


Comments

Popular posts from this blog

8051 INTERRUPT

Serial Communication With 8051 Microcontroller