NVIDIA Interview Question






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

float and string

- Anonymous November 03, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

switch case allows only integer constant or constant expression like case 1,case 2+3*4 etc

- Sagar alot September 29, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Yes, Floats and Strings **cannot** be used according to this reference:

http://math.hws.edu/javanotes/c3/s6.html

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

Yes, Floats and Strings **cannot** be used according to this reference:

http://math.hws.edu/javanotes/c3/s6.html

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

what abt variables say x which might have variable values supplied by user

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

switch case accept the only interger expressions and strings

- K Munivelu Reddy November 05, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Not strings but alphabets.

- Anonymous January 25, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

switch case allows only constant integral values (integer, char).

- Ashutosh November 05, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

yes true
it accepts only integer and char
in C# it accepts strings too

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

Even you give char, it converts it to int. So internally it only takes int.

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

the “controlling expression,” must be of an integral type or of a class type for which there is an unambiguous conversion to integral type.

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

hey Switch Can Only accept int or char
not string

test this program to confirm
#include <iostream>
#include <string>
using namespace std;

int main (void)
{
char word;
cout<< "Enter word to define: \n";
word = getchar();

switch (word){
case 'd':
cout<< "A four legged animal";
break;
case 'c':
cout<< "A animal scared of water";
break;
default:
cout<< "not in dictionary";
}
return 0;
}

- sk July 27, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

switch can accept enum constants as well....

- pr6989 September 14, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Java 7 allows switch statement to use strings

- Karthik February 15, 2013 | 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