Adobe Interview Question for Development Support Engineers






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

x>y ? x>z ? x : z : y > z ? y : z

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

(x>y?x:y)>z?(x>y?x:y):z

- fiddler.g July 24, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

(((x>y)?x:y)>z)?((x>y)?x:y):z

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

(x>y)? ( (x > z) ? x : z ) : ( (y > z) ? y : z )

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

max = num1 > num2 ? num1 > num3? num1 : num3: num2 > num3 ? num2:num3;

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

we can use concept
suppose if b>a then below concept can give b as output
c is average of a and b(in between) ;
d---> distance between avg and number(a or b);
c=(a+b)/2;
d=abs(a-b)/2;
so max number will be (c+d)..

a--------c--------b
<---d--->|<--d---->
so max that is b is (c+d);
for three number now get between b and another number using same concept.

- ridercoder October 17, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

@heehehhh
tu b chityaa

- ridercoder May 28, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

I think the point of the question is to use conditional operator only ONCE.
I can do it using it twice:
( x > y && y > z ) ? x : ( y > z ? y : z );

- tmpid December 24, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

int a,b,c,d;
  cin>>a>>b>>c;
  d = (a>b)?(a>c?a:c):(b>c?b:c);
  cout<<d<<endl;

- RD February 18, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

all the above fail for cases where all numbers are equal. It would only output the one that was compared last in the conditional.

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

max=a>b?(c>a?c:a):(c>b?c:b);

- rock August 23, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

int i=6,j=4,k=3,Max;
Max= i*(i>j&& i>k)+j*(j>i &&j> k)+k *(k>i&&k>j);

Do i miss , any special case??

- vijaymukilan July 17, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

int a=90,b=40,c=20;
int max;
max=((a >b)?((a>c)?a:c):((b>c)?b:c));

- sumit June 18, 2014 | 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