NVIDIA Interview Questions
0of 0 votesWhat is mip-maps and why are they used
0of 0 votesWhy we use 4X4 matrix for representing and calculations in transformation of 3D points when that can be done only with 3X3 matrix.
(the concept of homogenization of matrices and how they help including translation operation)
0of 0 votesWhat the different shaders(vetex, geomtery, pixel) describe their roles and the order in which they are executed in graphics pipeline
1of 1 votegiven y bytes and you can transfer only x bytes at once..give a mathematical expression having only + - / * which gives the number of iterations to copy y bytes. ( dont try giving modulo operator answers )
1of 1 voteSequence of steps that happen in CPU, cache, TLB, VM, HDD leading to execution of “x = 7” which isn’t present in cache or sysmem nor translation in TLB. Also specify if any intrs, exceptions or faults are generated.
0of 0 votesAssuming you have three N bit unsigned integers a, b and c, what is the min number of bits you would need to store the result of a * b + c?
0of 0 votesGiven a char array find possible soln like :
eg for "abc"
ans: {a,ab,abc.b,bc,c}
char[] function(char[])
0of 0 votesGiven an integer array find the longest subarray cantaining consequitive nos.
eg {4,5,34,33,32,11,10,31}
ans is {31,32,33,34}
int[] function(int[])
1of 1 voteGiven a 2D matrix of characters we have to check whether the given word exist in it or not.
eg
bool function(char[][],char[])
s f t
d a h
r y o
we can find "rat in it
(top down , straight ,diagonal).. even in reverse order. with least complexiety.
0of 0 votesGive output for the following code
#include<stdio.h> void main() { int i = 5; printf("%d\n",i++ + ++i); printf("%d\n",i++ + ++i + i++ + i++); printf("%d\n",++i + i++ + ++i + i++); }Please give the output with os and compiler u used with proper explanation. Getting unexpected answers..... help !!!
This is old question posed by senior student.
0of 0 votesswap every two bits in an unsigned char .. eg swap bits at 0 and 1st position, swap 2nd and 3rd position, swap 4th and 5th position etc ..
0of 0 votesGiven two numbers "a" and "b" and an average formula (a+b)/2. Find one condition where it wont work. Also, give solution to it
0of 0 votesIn a multi-threaded process,If one thread is busy on I/O will the entire process be blocked?
0of 0 votesAssuming there's no Array data structure in C, how would you implement it.
0of 0 votesgiven two integers and two bit positions. Set the first integer between the two bit positions to be that of the second integer.
0of 0 votesimplement sqrt(x)
0of 0 votesDifference between constant char pointer and constant pointer to a char.
0of 0 votesCode to find endianness of a machine.
0of 0 votes* You are given 2 eggs.
* You have access to a 100-storey building.
* Eggs can be very hard or very fragile means it may break if dropped from the first floor or may not even break if dropped from 100 th floor.Both eggs are identical.
* You need to figure out the highest floor of a 100-storey building an egg can be dropped without breaking.
* Now the question is how many drops you need to make. You are allowed to break 2 eggs in the process.
0of 0 votesYou are given 8 identical-looking balls, one of which is heavier than the other 7 (all of which weigh the same). Using an old-fashioned mechanical set of scales you must identify the heavier ball using the scale as few times as possible. The scale is constructed using two bowls and an arm enabling the bowls to either balance or have one bowl rising while the other (and heavier bowl) falling. You can't just add one ball at a time thinking its one weighing, however, you may put any number of balls in each bowl.
0of 0 votesDifference between array and linked list
0of 0 votesint error()
{
char *buf=(char *) malloc(10,sizeof(char));
return buf;
}
whats the error....?
warm up question
0of 0 voteswhy do we use circular link list in place of any balanced binary search tree in storage allocator? One draw back is that to free() a chunk of memory allocator has to search the link list and then if found that address then release , so why not tree to reduce this search and merge?
0of 0 voteshe drew a diagram on the white board, asked me this synchronization problem abt 2 processes trying to communicate with the hardware. there was 1 bit register on the hardware u can use as extra memory if u want. there were several approaches i tried, some which wouldnt work, the rest im not sure if they were right. in the end he said now give me a solution if it were a multi processor system. i didnt really say much after that. was pretty stuck.
0of 0 votesexample of volatile usage.
0of 0 votesaligned malloc, asked me exactly y do u allocate extra space for the void *. i tried to explain why, he wasnt listening. in the end he told me what i was trying to tell him
0of 0 votesos concepts involving deadlocks, semaphores, spinlocks, sleeping in the kernel ( process and interrupt context ), softirq's
interrupts, interrupt handling, few virtual memory questions
0of 0 votesfind if 2 strings are anagrams of each other
0of 0 votesimplement c subtring function. write the code, along with error checks and some basic testing
0of 0 votesrotate a matrix by 180 degrees. mxn matrix