C# Interview Questions
 view github

This is C# interview notes which did me a great favor and successfully offered with a job

▲ means waiting to be completed

Basic Concepts

Constructor

A member function in a class that has the same name as its class.

It constructs the value of data members while initializing class.

VS Destructor

Commonly Used Exceptions

ArgumentException, ArgumentNullException, ArgumentOutOfRangeException, ArithmeticException, DivideByZeroException, OverFlowException, IndexOutOfRangeException, InvalidCastException, InvalidOperationException, IOEndOfStreamException, NullReferenceException, OutOfMemoryException, StackOverFlowException

Class types in C#

  • Partial class: It allows its members to be divided or shared with multiple .cs files. It is denoted by the keyword Partial.
  • Sealed class: It is a class that cannot be inherited. To access the members of a sealed class, we need to create the object of the class. It is denoted by the keyword Sealed.
  • Abstract class: It is a class whose object cannot be instantiated. The class can only be inherited. It should contain at least one method. It is denoted by the keyword abstract.

  • Static class: It is a class that does not allow inheritance. The members of the class are also static. It is denoted by the keyword static. This keyword tells the compiler to check for any accidental instances of the static class. ( ▲)

Ref #5

Generic

Generic is a class which allows the user to define classes and methods with placeholders for the type of its fields, methods, parameters, etc..

Generics will be applied specific type with these placeholders at compile time.

A generic class can be defined using angle brackets <>.

Advantages of Generics:

  1. Increases the reusability of the code.
  2. Generic are type safe. You get compile time errors if you try to use a different type of data than the one specified in the definition.
  3. Generics performs faster by not doing boxing & unboxing.
  4. Generics can be applied to interface, abstract class, method, static method, property, event, delegate and operator.

Eg.

List<T>

Generic,reusable

Ref

Boxing & Unboxing

In .Net, all types are inherited from System.Object and divide into value type and reference type.

boxing means converting a value type into a reference type.

unboxing is the conversion of the same reference type back to value type, which means we can only do unboxing on a type that has done with boxing . (boxing unboxing)

By using Generic can reduce boxing and unboxing to perform faster.

Eg.

int value = 10; //value type
object boxedValue = value; //boxing
int unBoxing =  int(boxedValue); //unboxing

Note from Ref:

 int val = 100;
 object obj = val;
 Console.WriteLine (“对象的值 = {0}", obj);
 int val = 100;
 object obj = val;
 int num = (int) obj;
 Console.WriteLine ("num: {0}", num);

Indexer

indexer allows instances of a class or struct to be indexed just like arrays

<return type> this[<parameter type> index]
{
    get{
        // return the value from the specified index of an internal collection
    }
    set{
        // set values at the specified index in an internal collection
    }
}

//for example
public int this[int index]{//indexer declareation
    //do something
}

Example: Indexer

class StringDataStore
{
    private string[] strArr = new string[10]; // internal data storage

    public string this[int index]
    {
        get
        {
            if (index < 0 || index >= strArr.Length)
                throw new IndexOutOfRangeException("Index out of range");

                return strArr[index];
        }

        set
        {
            if (index < 0 ||  index >= strArr.Length)
                throw new IndexOutOfRangeException("Index out of range");

            strArr[index] = value;
        }
    }
}

The above StringDataStore class defines an indexer for its private array strArr. So now, you can use the StringDataStore like an array to add and retrieve string values from strArr, as shown below.

StringDataStore strStore = new StringDataStore();

strStore[0] = "One";
strStore[1] = "Two";
strStore[2] = "Three";
strStore[3] = "Four";

for(int i = 0; i < 10 ; i++)
    Console.WriteLine(strStore[i]);

You can use expression-bodied syntax for get and set from C# 7 onwards.

a

class StringDataStore
{
    private string[] strArr = new string[10]; // internal data storage

    public string this[int index]
    {
        get => strArr[index];

        set => strArr[index] = value;
    }
}

Ref

Jagged Arrays

  • Array of arrays
  • Length of each array can differ (not only to be a multi-dimension array)
  • Reference type
  • null is the default value

Declaration

Approach 1:

int[][] jagged_arr = new int[4][] //声明一个4行的jagged array(每行几个未知)

/*

    The first row or element is an array of 2 integers.
    The second row or element is an array of 4 integers.
    The third row or element is an array of 6 integers.
    The fourth row or element is an array of 7 integers.
*/
jagged_arr[0] = new int[2];
jagged_arr[1] = new int[4];
jagged_arr[2] = new int[6];
jagged_arr[3] = new int[7];

//g
jagged_arr[0] = new int[] {1, 2, 3, 4};
jagged_arr[1] = new int[] {11, 34, 67};
jagged_arr[2] = new int[] {89, 23};
jagged_arr[3] = new int[] {0, 45, 78, 53, 99};

Approach 2:

int[][] jagged_arr = new int[][]
{
    new int[] {1, 2, 3, 4},
    new int[] {11, 34, 67},
    new int[] {89, 23},
    new int[] {0, 45, 78, 53, 99}
};

Ref

Serialization

The process of converting an object into a byte stream.

If we want to transport an object through network, the object have to convert into a stream of bytes.

Eg., if user submits a form data from front-end to server, the data should be serialized first.

j

System.Object

System.Object is the base class in .Net which is all classes derived from.

h

Delegates

C# delegates are similar to pointers to functions in C or C++. A method can be passed as a parameter.

A delegate is a reference type variable that holds the reference to a method. The reference can be changed at run time.

Delegates are especially used for handling event and call-back methods.

Ref

multicast delegate

A delegate having multiple handlers assigned to it.

Each handler is assigned to a method.

Garbage Collection

managed code: Under the of control of Common Language Runtime, .NET’s garbage collector manages the allocation and release of memory for your application. Garbage collector will collect and dispose of garbage memory automatically.

unmanaged codelike database connection, I/O operations (files), socket, garbage should be collected manually by using Despose() method or use using.

Managed Code VS Unmanaged Code

Managed Code is a code whose execution is managed by CRL(Common Language Runtime). It is not complied to machine code directly, but to an intermedia language, which provides runtime service like Garbage Collection, exception handling, etc..

Unmanaged Code is directly executed by the operation system compiled to machine code.

unmanaged code: database connection, files, socket

dispose() VS finalize()

Dispose() Finalize()
Release unmanagement resource at anytime, like files, database connection. Release before object is destroyed.
Called by user code. Internally, called by Garbage Collector (cannot be called by user code)
no performance costs performance costs (since it doesn’t clean the memory immediately and called by GC automatically.)

Note from Ref

  1. It is always recommended to use Dispose method to clean unmanaged resources. You should not implement the Finalize method until it is extremely necessary.
  2. At runtime C#, C++ destructors are automatically Converted to Finalize method. But in VB.NET you need to override Finalize method, since it does not support destructor.
  3. You should not implement a Finalize method for managed objects, because the garbage collector cleans up managed resources automatically.
  4. A Dispose method should call the GC.SuppressFinalize() method for the object of a class which has destructor because it has already done the work to clean up the object, then it is not necessary for the garbage collector to call the object’s Finalize method.

Dispose

C# management resourcefinalize(),destructorsfinalize()

Destructor (Finalizer)

Destructor is used to clean up the memory and free the resources. But in C# this is done by the garbage collector on its own. System.GC.Collect() is called internally for cleaning up. But sometimes it may be necessary to implement destructors manually.

sometimes means when dealing with unmanagedcode

For Example:

~Car()
{
Console.writeline(“….”);
}

Ref

Code compilation in C#

  1. Compiling the source code into Managed code by C# compiler.
  2. Combining the newly created code into assemblies.
  3. Loading the Common Language Runtime(CLR).
  4. Executing the assembly by CLR.

Ref #6

Multiple Catch Blocks

Multiple catch blocks can’t be executed. Once the proper catch code executed, the control is transferred to the finally block, and then the code that follows the finally block gets executed.


Code Patters ▲

Singleton

A class only have one instance, and provides an access point to it globally.

public sealed class Singleton
{
    private static readonly Singleton _instance = new Singleton();
}

Eg. database connection

object pool

Object pooling is a software creational design pattern and a container of objects that holds a list of other objects—those are ready to be used. Once an object is taken from the pool, it is not available in the pool until it is put back. Object pooling keeps track of Objects—those are currently in use, the number of objects the pool holds, and whether this number should be increased. Objects in the pool have a lifecycle of creation, validation, and destroying.

Ref

Polymorphism ▲

overloading

Multiple methods have a same name with different parameters (unique method signature).

Overloading Ways
  • using different data types for a parameter
  • using different order of parameters
  • using different number of parameters

override

To change the method definitionin the derived class.

Async ▲

task

Concept Comparations

Array VS Array List

Array Array List
fixed size dynamic memory allocation 变
store one data type only different data type (given example below)
memory-efficient occupy more memory
not accept null accept null
better for frequent insertion and deletion better for frequent element access

Ref

Array List VS List

List<T> is a generic class that supports storing values of a specific type.

ArrayList simply stores object reference.

Ref

Array List

ArrayList array1 = new ArrayList();
array1.Add(1);
array1.Add("Pony"); //No error at compile process
int total = 0;
foreach (int num in array1)
{
 total += num; //-->Runtime Error
}

ArrayList(deprecated ),List<T>

List<int> list1 = new List<int>();
list1.Add(1);
//list1.Add("Pony"); //<-- Error at compile process
int total = 0;
foreach (int num in list1 )
{
 total += num;
}

class VS object

Object is an instance of a class.

class VS struct

Classes:

  • Can support inheritance
  • Are reference (pointer) types
  • The reference can be null
  • Have memory overhead per new instance
  • Good for larger complex objects

Structs:

  • Cannot support inheritance
  • Are value types
  • Are passed by value (like integers)
  • Cannot have a null reference (unless Nullable is used)
  • Do not have a memory overhead per new instance - unless ‘boxed’
  • Good for Small isolated models

Both Classes and Structs:

  • Are compound data types typically used to contain a few variables that have some logical relationship
  • Can contain methods and events
  • Can support interfaces

Ref

is VS as

`(non-value type):

The is operator is used for only reference, boxing, and unboxing conversions whereas as operator is used only for nullable, reference and boxing conversions

AS is VS as

is operator is used to check the compatibility of an object with a given type. It returns result as boolean.

is boolean

asoperator is used for casting of object to a type or a class. This operator returns the object when they are compatible with the given type and return null if the conversion is not possible instead of raising an exception.

as,object,null

is:

  1. true(false);
  2. null,false;
object o = "abc";
if (o is string)
{
    string s = (string)o; /
    MessageBox.Show("Success!");
}
else
{
    MessageBox.Show("Try!");
}

as:

object o = "abc";
string s = o as string; //执行第一次类型兼容性检查,并返回结果
if (s != null)
    MessageBox.Show("success!");
else
    MessageBox.Show("failed!");

Type Conversion in C#

double x = 1234.7;
int a;
// Cast double to int.
a = (int)x;

abcd

System.String VS System.Text.StringBuilder

System.String is immutable (read-only), whereas System.Text.StringBuilder is mutable.

System.String : If a string object will be modified, it will result into the creation of a new string object. A new memory is allocated to new value and the previous memory allocation released.

String

System.Text.StringBuilder : Do modification in the existing string objects, so it shows better performance.

StringBuilder

Usage

In the need of repetitive operations and multiple string manipulations, StringBuilder provides a optimized way.

Ref1 Ref2

System.Array.CopyTo() VS System.Array.Clone()

Similarity: Both perform Shallow Copy

copyTo(): Copy all elements into another existing array

clone(): create a new array containing all the elements in the Original Array.

Shallow Copy VS Deep Copy

Shallow Copy: contents (each array element) contains references to the same object as the elements in the original array.

reference,

Deep Copy: duplicated everything. Create a new instance of each element’s object, result in a different yet identical object.

Eg.

Your example is creating a shallow copy.

A ob1 = new A();
ob1.a = 10;
A ob2 = new A();
ob2 = ob1; //shallow copy

ob1.a = 5; // <-- If you see value of ob2.a after this line, it will be 5.

Deep copy will be -

 A ob1 = new A();
 ob1.a = 10;
 A ob2 = new A();
 ob2.a = ob1.a; //deep copy

 ob1.a = 5; // <-- If you see value of ob2.a after this line, it will be 10.

Ref1 Ref2

Strongly Typed Language VS Weakly Typed Language

Strongly Typed Language will not automatically converted form one type to another.

Weakly Typed Language will automatically converted form one type to another.

Eg.

4+"7" = "47" works in JavaScript, but error in C#

throw VS throw ex

throw re-throws the exception that was caught, and preserves original stack trace.

throw ex throws the same exception, but reset the stack trace to that method. (Only have the stack trace from the throw point)

throw Stack Trace

throw ex stack trace

Example from Ref

static void Main(string[] args) {
    try {
        ThrowException1(); // line 19
    } catch (Exception x) {
        Console.WriteLine("Exception 1:");
        Console.WriteLine(x.StackTrace);
    }
    try {
        ThrowException2(); // line 25
    } catch (Exception x) {
        Console.WriteLine("Exception 2:");
        Console.WriteLine(x.StackTrace);
    }
}

private static void ThrowException1() {
    try {
        DivByZero(); // line 34
    } catch {
        throw; // line 36
    }
}
private static void ThrowException2() {
    try {
        DivByZero(); // line 41
    } catch (Exception ex) {
        throw ex; // line 43
    }
}

private static void DivByZero() {
    int x = 0;
    int y = 1 / x; // line 49
}

and here is the output:

Exception 1:
   at UnitTester.Program.DivByZero() in <snip>\Dev\UnitTester\Program.cs:line 49
   at UnitTester.Program.ThrowException1() in <snip>\Dev\UnitTester\Program.cs:line 36
   at UnitTester.Program.TestExceptions() in <snip>\Dev\UnitTester\Program.cs:line 19

Exception 2:
   at UnitTester.Program.ThrowException2() in <snip>\Dev\UnitTester\Program.cs:line 43
   at UnitTester.Program.TestExceptions() in <snip>\Dev\UnitTester\Program.cs:line 25

Value Type VS Reference Type

value type: holds a data value within its own memory space.

int a = 30;

reference type: stores the address of the Object where the value is being stored. It is a pointer to anther memory location.

string b = "Hello World"

Keywords

abstract method, virtual method and override method

vitrual and abstract modifier use within base class method.

override modifier use with derived class method. It is used to modify a virtual or abstract method which presents in base class.

abstract method should be used in an abstract class.

virtual abstractoverride

abstract abstract,abstract

abstractbody(

 public abstract void MyMethod();

Abstract classes have the following features:

  • An abstract class cannot be instantiated.
  • An abstract class may contain abstract methods and accessors.
  • It is not possible to modify an abstract class with the sealed modifier because the two modifiers have opposite meanings. The sealed modifier prevents a class from being inherited and the abstract modifier requires a class to be inherited.
  • A non-abstract class derived from an abstract class must include actual implementations of all inherited abstract methods and accessors. Use the abstract modifier in a method or property declaration to indicate that the method or property does not contain implementation.

Abstract methods have the following features:

  • An abstract method is implicitly a virtual method.
  • Abstract method declarations are only permitted in abstract classes.
  • Because an abstract method declaration provides no actual implementation, there is no method body; the method declaration simply ends with a semicolon and there are no curly braces ({ }) following the signature. For example:
public abstract void MyMethod();

Reference: virtual abstract override

Eg.

public abstract class E
{
    public abstract void AbstractMethod(int i);

    public virtual void VirtualMethod(int i)
    {
        // Default implementation which can be overridden by subclasses.
    }
}

public class D : E
{
    public override void AbstractMethod(int i)
    {
        // You HAVE to override this method
    }
    public override void VirtualMethod(int i)
    {
        // You are allowed to override this method.
    }
}

Ref- overriding

Ref-abstract vs virtual

abstract class VS interface

Interface only include abstract method that only has the definition of the methods without body

Abstract class can include both achieved methods and abstract methods.

Why can’t specify accessibility modifier for methods inside interface?

In an interface, it only includes virtual methods that do not have a definition (abstract methods). All methods are there to be overridden in the derived class. That’s why they all public.

interface,public。

constant VS readonly

constant readonly
declared an initialized variables at compile time used only when we want to assign the value at run time
can’t be changed afterwards can assign values in constructor part(can change value)
can’t be used with static modifier (because it’s static already) can use static
static static`

public, static, and void

  • public: accessible anywhere in application
  • static: globally accessible without creating an instance of the class
  • void: no return value

ref VS out

Both indicate an argument is passed by reference

A variable is passed as an out parameter doesn’t need to be initialized but ref has to be set to something.

this

this keyword is used to refer to the current instance of the class / current class oject.

In most cases, it is used to access variables and methods from current class.

Ref

Can this be used in a static method?

No, this can’t be used in a static method, because this refers to an object instance, but no current instance in a static method

using

using block is used to obtain a resource and process it then automatically dispose it when the execution of the block completed. Even if the code throws an exception.

Usually use using for methods/classes that require cleaning up after execution, like “I/O”.

using block

Eg:

this using block:

using (MyClass mine = new MyClass())
{
  mine.Action();
}

would do the same as:

MyClass mine = new MyClass();
try
{
  mine.Action();
}
finally
{
  if (mine != null)
    mine.Dispose();
}

Using using is way shorter and easier to read.

using

sealed

A sealed class is a class which cannot be a base class of another more derived class.

A sealed method in an unsealed class is a method which cannot be overridden in a derived class of this class.

Eg.

class Base {
   public virtual void Test() { ... }
}
class Subclass1 : Base {
   public sealed override void Test() { ... }
}
class Subclass2 : Subclass1 {
   public override void Test() { ... } // Does not compile!
   // If `Subclass1.Test` was not sealed, it would've compiled correctly.
}

Ref

Tips:

To compose a decent answer, in my view, it should answer

  1. What – interpreting the jargon first
  2. When – giving an example with a detailed situation where you did or you should use
  3. Why – taking about some advantages or disadvantages better comparing with another related one(possibly it is the next question, good to answer it in advance)

Cplus Questions

embedded-interview-questions

1) Which endianness is: A) x86 families. B) ARM families. C) internet protocols. D) other processors? One of these is kind of a trick question.

2) Explain how interrupts work. What are some things that you should never do in an interrupt function?

3) Explain when you should use “volatile” in C.

4) Explain UART, SPI, I2C buses. Describe some of the signals in each. At a high-level describe each. Have you ever used any? Where? How? What type of test equipment would you want to use to debug these types of buses? Have you ever used test equipment to do it? Which?

5) Explain how DMA works. What are some of the issues that you need to worry about when using DMA?

6) Where does the interrupt table reside in the memory map for various processor families?

7) In which direction does the stack grow in various processor families?

8) Implement a Count Leading Zero (CLZ) bit algorithm, but don’t use the assembler instruction. What optimizations to make it faster? What are some uses of CLZ?

9) What is RISC-V? What is it’s claimed pros or cons?

10) List some ARM cores. For embedded use, which cores were most commonly used in the past? now?

11) Explain processor pipelines, and the pro/cons of shorter or longer pipelines.

12) Explain fixed-point math. How do you convert a number into a fixed-point, and back again? Have you ever written any C functions or algorithms that used fixed-point math? Why did you?

13) What is a pull-up or pull-down resistor? When might you need to use them?

14) What is “zero copy” or “zero buffer” concept?

15) How do you determine if a memory address is aligned on a 4 byte boundary in C?

16) What hardware debugging protocols are used to communicate with ARM microcontrollers?

JTAG and SWD.

17) What processor architecture was the original Arduino based on?

The ATmega168 on the Arduino Duemilanove (?)

18) What are the basic concepts of what happens before main() is called in C?

19) What are the basic concepts of how printf() works? List and describe some of the special format characters? Show some simple C coding examples.

20) Describe each of the following? SRAM, Pseudo-SRAM, DRAM, ROM, PROM, EPROM, EEPROM, MRAM, FRAM, …

21) Show how to declare a pointer to constant data in C. Show how to declare a function pointer in C.

uint8_t foo = 20;
uint8_t * bar;
bar = &foo;

22) How do you multiply without using multiply or divide instructions for a multiplier constant of 15, 30, 60, 260?

23) When do you use memmove() instead of memcpy() in C? Describe why.

24) Why is strlen() sometimes not considered “safe” in C? How to make it safer? What is the newer safer function name?

25) When is the best time to malloc() large blocks of memory in embedded processors? Describe alternate approach if malloc() isn’t available or desired to not use it, and describe some things you will need to do to ensure it safely works.

26) Describe symbols on a schematic? What is a printed circuit board?

27) Do you know how to use a logic probe? multimeter? oscilloscope? logic analyzer? function generator? spectrum analyzer? other test equipment? Describe when you might want to use each of these. Have you hooked up and used any of these?

28) What processors or microcontrollers are considered 4-bit? 8-bit? 16-bit? 24-bit? 32-bit? Which have you used in each size group? Which is your favorite or hate?

29) What is ohm’s law?

V = I * R

30) What is Nyquist frequency (rate)? When is this important?

31) What is “wait state”?

32) What are some common logic voltages?

3.3v is most commonly used nowadays, followed by 5v and 1.8v.

33) What are some common logic famlies?

34) What is a CPLD? an FPGA? Describe why they might be used in an embedded system?

35) List some types of connectors found on test equipment.

36) What is AC? What is DC? Describe the voltage in the wall outlet? Describe the voltage in USB 1.x and 2.x cables?

  • Alternative Current and Direct Current. Alternative Current alternates between VCC and GND at a fixed frequency, usually 60Hz. Direct current does not.

  • In a wall outlet, the AC voltage is 220v (in European and Asian countries), and 110V (in US and Canada).

  • In USB 1.x and 2.x cables, DC voltage is 5v.

37) What is RS232? RS432? RS485? MIDI? What do these have in common?

-

  • They are all serial communication protocols.

38) What is ESD? Describe the purpose of “pink” ESD bags? black or silvery ESD bag? How do you properly use a ground strap? When should you use a ground strap? How critical is it to use ESD protections? How do you safely move ESD-sensitive boards between different parts of a building?

39) What is “Lockout-Tagout”?

Safety protocol used to prevent tampering with machinery when not in use. The machinery in question has to be locked and tagged (with the name of the person who holds the key) when not in use.

40) What is ISO9001? What is a simple summary of it’s concepts?

41) What is A/D? D/A? OpAmp? Comparator Other Components Here? Describe each. What/when might each be used?

42) What host O/S have you used? List experience from most to least used.

  • Linux (Fedora, Ubuntu, Debian, Arch)

  • Windows

  • MacOS

43) What embedded RTOS have you used? Have you ever written your own from scratch?

  • FreeRTOS, ChibiOS

  • Not yet

44) Have you ever implemented from scratch any functions from the C Standard Library (that ships with most compilers)? Created your own because functions in C library didn’t support something you needed? Most functions, `atoi`, `itoa`, and other misc. functions in K&R's book.

45) Have you ever used any encryption algorithms? Did you write your own from scratch or use a library (which one)? Describe which type of algorithms you used and in what situations you used them?

45) What is a CRC algorithm? Why would you use it? What are some CRC algorithms? What issues do you need to worry about when using CRC algorithms that might cause problems? Have you ever written a CRC algorithm from scratch?

46) Do you know how to solder? Have you ever soldered surface mount devices?

Yes. Yes, but badly.

47) How do you permanently archive source code? project? what should be archived? what should be documented? have you ever written any procedures of how to archive or build a project? How about describing how to install software tools and configuring them from scratch on a brand new computer that was pulled out of a box?

48) What issues are a concern for algorithms that read/write data to DRAM instead of SRAM?

49) What is the “escape sequence” for “Hayes Command Set”? Where was this used in the past? Where is it used today?

50) What is the “escape character” for “Epson ESC/P”? Where is this used?

51) After powerup, have you ever initialized a character display using C code? From scratch or library calls?

52) Have you ever written a RAM test from scratch? What are some issues you need to test?

53) Have you ever written code to initialize (configure) low-power self-refreshing DRAM memory after power up (independent of BIOS or other code that did it for the system)? It’s likely that most people have never done this.

54) Write code in C to “round up” any number to the next “power of 2”, unless the number is already a power of 2. For example, 5 rounds up to 8, 42 rounds up to 64, 128 rounds to 128. When is this algorithm useful?

55) What are two of the hardware protocols used to communicate with SD cards? Which will most likely work with more microcontrollers?

56) What issues concerns software when you WRITE a value to EEPROM memory? FLASH memory?

57) What is NOR-Flash and NAND-Flash memory? Are there any unique software concerns for either?

58) Conceptually, what do you need to do after reconfiguring a digital PLL? What if the digital PLL sources the clock for your microcontroller (and other concerns)?

59) What topics or categories of jokes shouldn’t you discuss, tell, forward at work?

  • Jokes considered inappropriate or of discriminative nature.

60) Have you ever used any power tools for woodworking or metalworking?

Table saw, miter saw, drill, orbital sander, belt sander, planar, MIG welder.

61) What is a common expression said when cutting anything to a specific length? (old expression for woodworking)

Measure twice cut once.

62) Have you ever 3D printed anything? Have you ever created a 3D model for anything? List one or more 3D file extensions.

  • Yes

  • Yes

  • .stl, .obj

63) Do you know how to wire an AC wall outlet or ceiling light? Have you ever done either?

  • Yes

  • Yes

64) Have you ever installed a new hard drive / RAM / CPU in a desktop computer?

  • Yes

  • Yes

65) Have you ever installed Windows or Linux from scratch on a computer that has a brand-new hard drive?

  • Yes

  • Yes

66) Have you ever “burned” a CD-R or DVD-R disc? Have you ever created an ISO image of a CD or DVD or USB drive or hard drive?

  • Yes

  • Yes

67) Have you ever read the contents of a serial-EEPROM chip from a dead system (though EEPROM chip is ok)?

  • Yes, but it wasn’t dead

68) Have you ever written data to a serial-EEPROM chip before it is soldered down to a PCB?

  • Yes

69) How do you erase an “old school” EPROM chip? (has a glass window on top of the chip)

  • Erasing an EPROM is done by shining ultraviolet ray on the window - an alternative is to leave it out under direct sunlight for a bit.

70) Describe any infrared protocols, either for data or remote controlling a TV.

71) What is the most common protocol is used to communicate with a “smart card”? Have you ever written any software to communicate with a “smart card” in an embedded product?

72) What is I2S? Where is it used? Why might you want to use I2S in an embedded system? Have you ever used it?

73) What is CAN, LIN, FlexRay? Where are they used? Have you ever used any?

74) What is ARINC 429? Where is it commonly used? Have you ever used it?

75) What in-circuit debuggers or programmers have you used? Which one do you like or hate?

ST-Link

76) Do you know any assembler code? For which processor? What assembler code is your favorite or hate? Have you ever written an assembler from scratch?

77) What is “duff’s device”? Have you ever used it?

78) What is dual-port RAM? Why would it be useful in some embedded systems? What concerns do you need to worry about when using it? Have you ever used it? How?

79) Have you ever soldered any electronic kits? Have you ever designed your own PCB(s)? Describe. What is a Gerber file?

  • Yes

  • Yes, a couple of times.

  • A file used to describe how a circuit board can be printed. This is what most PCB Manufacturers require when you order a PCB. 80) If you create a circular buffer, what size of buffer might optimized code be slightly faster to execute? why?

81) Describe how to multiply two 256-bit numbers using any 32-bit processor without FPU or special instructions. Two or more methods?

Awesome Interviews Awesome

A curated list of lists of technical interview questions.

What makes for an awesome list?

Please read the contribution guidelines or the creating a list guide if you want to contribute.

Check out my channel or blog.

Table of Contents

Programming Languages/Frameworks/Platforms

Android

AngularJS

Angular

BackboneJS

C++

C

C#

.NET

Clojure

CSS

Cucumber

Django

Docker

EmberJS

Erlang

Golang

GraphQl

HTML

Ionic

iOS

Java

JavaScript

jQuery

Front-end build tools

KnockoutJS

Less

Lisp

NodeJS

Objective-C

PHP

Python

Ruby on Rails

ReactJS

Ruby

Rust

Sass

Scala

SharePoint

Shell

Swift

WordPress

TypeScript

Database technologies

Cassandra

Microsoft Access

MongoDB

MySQL

Neo4j

Oracle

Postgres

SQL

SQL Lite

Caching technologies

Memcached

Redis

OS

Linux

Windows

Algorithms

Blockchain

Coding exercises

Comprehensive lists

Design Patterns

Data structures

Networks

Security

Data Science