Software Engineer-systems Software Interview Questions in San Jose, CA | Glassdoor

Software Engineer-systems Software Interview Questions in San Jose, CA

52

Software engineer-systems software interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

Tegra Systems Software Engineering at NVIDIA was asked...

Feb 27, 2012
 identify the number of 1s in an integer is odd or even7 Answershint is XORvoid OnesAreOdd(int n) { int i=0; while(n!=0) { n=n&(n-1); i++; } return (i&1==1)?true:false; }Above solution is incorrect. void OnesAreOdd(int n) { int i=0; while(n!=0) { n=n&(n-1); i=i^1; } return i==1?true:false; }Show More ResponsesWas taken from: http://graphics.stanford.edu/~seander/bithacks.html unsigned int v; // word value to compute the parity of bool parity = false; // parity will be the parity of v while (v) { parity = !parity; v = v & (v - 1); }Hey guys, why are you thinking the question means binary 1s? I think it means decimal 1s.Let number be c int count = 0; while ( c != 0 ) { count += (c & 1); c >> 1; } if ( count%2 == 0) printf("Number of 1s are even);Easy dumb solution, convert the number to string and count. sprintf(str, "%d", num); int i=0, cnt=0; while (str[i]!='\0') { if (str[i++]=='1') cnt++; } if (cnt%2) printf("odd"); else printf("even");

Systems Software Engineer at NVIDIA was asked...

Apr 27, 2012
 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.6 Answers//naive solution: int getAlignedValue(int pageSize, int valueToAlign) { int index = valueToAlign/pageSize; return index * pageSize; } //faster solution: int getAlignedValue_Fast(int pageSize, int valueToAlign) { return valueToAlign & !(pageSize-1); }I think that at the faster solution you mean int getAlignedValue_Fast(int pageSize, int valueToAlign) { return valueToAlign & ~(pageSize-1); } Note: There is a difference between !(pageSize-1) and ~(pageSize-1) ~(0x11) is 0xee !(0x11) is 0@The Dude Good catch! I didn't think about that. (Fortunately, I didn't have to execute the code in the interview--I just typed it in a program similar to Google Docs.) Thanks!Show More ResponsesI just wanted to point out that the "faster solution" only works if the pageSize is assumed to be a power of 2. For example, suppose pageSize = 10 (or 01010 in binary), and valueToAlign = 24 (or 11000 in binary), then the fast method would give 16, but it should be 20. Anyways, thanks for posting the question and solution.@observer I see how the mask works out for the alignment, why it is works mathematically? ThanksThe interviewer could be looking for some bit ops. But, the following one, works even page size isn't a power of 2. int mod = (value_to_align % page_size); value_to_align -= mod; if (mod > (page_size - mod)) { value_to_align += page_size; }

Systems Software Engineer at NVIDIA was asked...

Apr 27, 2012
 Implement memcpy.4 Answersvoid memcpy (int* dest, int* src, int length) { char* currSrc = (char*)src; char* currDest = (char*)dest; for(int i=0; iyou should care about how src and dest are overlapped, and copy from left or from right.void memcpy (void *dest, void *src, size_t length) { int *currSrc = src; int *currDest = dest; chat *charSrc, *chardst; size_t nTimes = length / sizeof(int) for(int i=0; iShow More Responsesvoid my_memcpy(void *dst, void *src, int size) { for(int i=0; i

Senior Systems Software Engineer at NVIDIA was asked...

Jun 16, 2010
 Find the words used in some text and report by word length and how often each word appears.1 AnswerParse list to obtain words, whether space/comma/linebreak delimiter ArrayList> where the word length will be the index of the ArrayList. HashMap will have key as the single word in text and the value will be an Integer as the counter for how many times the word appears.

Tegra Systems Software Engineering at NVIDIA was asked...

Feb 27, 2012
 find a sub-string in a string1 Answerbrute force is acceptable

Product Associate at GirnarSoft was asked...

May 5, 2014
 Idea on creating mobile apps for various purposes in real-life situations? HR asks: Who do I love more Mother or Father? Whether or not ready to settle in life early? Would you prefer Entrepreneurship or MBA or higher studies ?? I think you are Diplomatic person, what do you say? 1 AnswerApps related to post car sales, for buying shirt in a mall, to generate more features to previous startups that I have worked on previously in campus.

Senior Systems Software Engineer at NVIDIA was asked...

Jul 16, 2013
 if there exists a sequence of integers in order, and you are at a receiver and you obtain these integers out of order, how can you know which integer is missing?1 AnswerI said receive the numbers in a linked list so when they are done they are sorted and then we can tell which one is missing. The answer the interviewer was looking for was simply add them and subtract them from the expect value (which assumed we know the base but this wasnt clarified).

Senior Systems Software Engineer at NVIDIA was asked...

Sep 12, 2014
 How do you keep hardware registers from being cached?2 AnswersThere is a map register that excludes some memory regions.Use the volatile keyword when memory mapping the hardware register to a variable. This way software always 'sees' the unchached value of the register.

Senior Systems Software Engineer at NVIDIA was asked...

Jul 26, 2015
 Most of the interviews were discussion oriented, past projects and technology used. Positive experience overall. Some difficult questions thrown in, search algorithms.Be the first to answer this question

Systems Software Engineer at NVIDIA was asked...

Jan 16, 2012
 basic OS stuff, implementation of strstr & sprintf, interrupt handler, synchronization designBe the first to answer this question
110 of 52 Interview Questions

More