Adobe Interview Question


Country: United States
Interview Type: In-Person




Comment hidden because of low score. Click to expand.
6
of 8 vote

max function should be defined/declared before usage.

- Akshat February 13, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

If not the function, atleast it's prototype.

int max(int a, int b);

- Killedsteel February 13, 2014 | Flag
Comment hidden because of low score. Click to expand.
3
of 3 vote

Lol, the problem is here:

if(root=NULL)
	return 0;

This is an assignment operation. What you really want, is this:

if(root == NULL)
	return 0;

- Killedsteel February 13, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

For real? May be the author typed wrong.

- owenwilder February 13, 2014 | Flag
Comment hidden because of low score. Click to expand.
4
of 6 votes

There will not be a compiler error in this case (Atleast in gcc).

- Vishnu February 13, 2014 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

compiler will complain max function is missing

- tkg February 15, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

if the question means it will show wrong answer then the problem is with if(root=NULL)
and if it means compiler error then..there wil be no compiler error...it will successfully compiled..in c we dont need to declare a function before using it;

- kanhaiya.yadav47 March 17, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

i would recommend not to discuss this type of question here.
this portal is to help jobseeker and the one wro are preparing for inteview.
so better not to waste their time,

- abhi May 10, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
-2
of 2 vote

struct node{
node* left;
node* right;
};

is missing.

- ocsi February 13, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

maybe this is not a program. because it is just a program snippt.

- wy250801860 February 14, 2014 | Flag


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