Given a page size and a number, align the number with the nearest page. (Note: This was a phone interview question. The interviewer and I used an online document to share ideas about this problem.
Systems Programmer Analyst Interview Questions
1,378 systems programmer analyst interview questions shared by candidates
Implement memcpy.
write a function to set a particular field of register to the desired value. ( For example, set bit 3 - 10 of a word to the given value)
How would you triage and go about fixing infrastructure problems? Giving an input file, get the number of lines matching a specific piece of text using bash scripting. Give the percentage of lines in the file that match that string.
5 bags, each bag has some balls. 1 bag has faulty balls. There are faulty balls weighing 1.1kg and good ones weighing 1kg. There is a weighing machine. Determine in how many measurements can you find the bag with faulty balls and which bag contains it.
You are hosting a party with 1000 bottles of wine and 10 servants, however, one of the bottles has been poisoned. How do you determine, using the servants, which bottle of wine is poisoned?
Say the program you are running has stack overflow. You want to know when and where this happens, but you don't want to use debuggers, because they slow. How would you do this?
1. You have two strings. A test string and a glob Test string can have a & b, any number of times, any location. Glob can have a, b, ? and *, any number of times, any location. E.g. test= {a,b,a,a,a,a,b,b,b,b,b,b} glob = {a,?, *, b} Now, ? means ANY character, single occurrence. So it's either a or b, one time * means ANY OR NO character, any number of occurrences. E.g. the above glob and test actually match. Problem is: write an algorithm to match glob with test. You MAY NOT use regular expressions :D 2. The input is any string of any length of any characters. Write a program to generate ALL unique permutations of those characters. Unique. You may not store in an array or list, due to memory constraints. e.g. for input of abc your program should give 6 permutations but for aba your program should give 3. Hint: make the list alphabetical.
If we have a string : "abc ef 12 g", write a function that takes the pointer to the string reorganizes the string to be: "g 12 ef abc". Note that there are 3 spaces after abc, 2 spaces after ef, and 1 space after 12 in the original string, but the spaces are reversed. So in essence, write a function to reverse a string and then put the words between the spaces back in order. And the string length can be known or not.
write a function to check if an unsigned integer is a power of 2. if it is a power of 2, return the power. otherwise return 0.
Viewing 1 - 10 interview questions