NVIDIA Interview Question for Software Engineer / Developers






Comment hidden because of low score. Click to expand.
1
of 1 vote

clear the bit 1 to 8 and then shift the result to the left of 8 bits. The result is the solution...

inline unsigned int mod256(unsigned int _i)
{
_i &= (~255);
_i >>= 8;
return _i;
}

- Nostra December 11, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Good one.!!

- leo.mk October 08, 2010 | Flag
Comment hidden because of low score. Click to expand.
1
of 1 vote

don't really need to clear the bits.

return i>>8;

gives the same results.

- Jie March 03, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

For eq., numbers form 0..254 are 0 multiples of 256.
255..511 are 1 multiple of 256 and so on.

- Pia December 04, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote
{{{ a= 255; //lets say x is the number for which you want to check the multiplicity int i =0; if(x) { x = x&(!a); a<<8; i++; } return i; } - Mohit December 04, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

why 255 is 1 multiple of 256?

- Anonymous December 29, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Use nth roots. For example 1=256^0, 2=256^(1/8). Use the binary representation of the number to represent any number.

- Anonymous March 05, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

int reprensent_256times(int num){
	num&=~255;
	return num>>8;
}

- Yimin November 01, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

If number is -512 then result should be -2, if number is 0 then result should be 0 and if number is 512 then result should be 2.

Then simply the following code will work

int represt_256( int num)
{
return num >> 8;
}

- Anonymous December 13, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

if (number%256==0)
{
number is multiple of 256
}
else
number is not multiple of 256

- Anonymous July 25, 2010 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More