## 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

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

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

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

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

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

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

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

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

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.

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

@heehehhh
tu b chityaa

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 );

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;``````

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.

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

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

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??

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));``````

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.

### 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.