National Instruments Interview Report
- 1of 1 vote
AnswersPrint a Link list in reverse order.
- SG October 15, 2008
Given: PrintReverse(List *head){}
Discuss Pros and cons of Inplace reversal, as compared to reversing by creating a new list. They were looking not only for Memory and Space, but also from a concurrency Point of View.| Report Duplicate | Flag | PURGE
National Instruments Software Engineer / Developer Coding - 1of 0 votes
AnswersMake a nonblocking UART library given a underlying UART hardware, data registers and flags that mark end of transmission and stuff.
- SG October 15, 2008
This is very common. Simply look for Software UART in embedded systems. Also uses some OS concepts like round-robin, preventing spin locks etc.| Report Duplicate | Flag | PURGE
National Instruments Software Engineer / Developer Coding - 1of 1 vote
AnswersDesign a One shot timer library capable of supporting multiple times simultaneously. Cancel is also supported. Only ONE hardware timer register.So basically, a process/function can call SetTime(10) and it will get notified after 10 seconds. It can also say SetTime(2)... SetTime(7). Then it will get two notifications, one after 2 and one after 7. [SetTime returns a handle]
- SG October 15, 2008
The process(s) can also issue a cancel. Cancel(handle), to cancel a specific timer they set.
The hardware timer registers, assume decrements by 1 every 1 second. So if you set it to 10, it will notify you after 10 seconds. Basically it interrupts, and lets say calls RegExpired(). You can Read/Write this register anytime very fast (uS).
The key here how you make use of this single register to support any number of timer events that applications/processes are demanding asynchronously.
Discuss the data structure you would use and implement it in C.| Report Duplicate | Flag | PURGE
National Instruments Software Engineer / Developer Coding - 4of 0 votes
AnswersGiven location of huge number of points (you decide the data structure to represent them). Write a function that returns the number of points that are with distance D of a given point P.
- SG October 15, 2008
Write function, complete with what data structures, function signature etc.| Report Duplicate | Flag | PURGE
National Instruments Software Engineer / Developer Large Scale Computing