Adobe Interview Question for Testing / Quality Assurances


Country: United States
Interview Type: Phone Interview




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

Answer is 64 because the preprocessor will replace the macro call with the text X*X (where X is the provided number). Since / has the precedence on * then th computation is (64/4)*4 = 64

- Guest January 30, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

yep.its 64

- varun January 30, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

yep.its 64

- varun January 30, 2012 | Flag
Comment hidden because of low score. Click to expand.
1
of 1 vote

Perhaps it is worth to tell how this macros should have been written

#define SQUARE(x) ((x)*(x))

- Selmeczy, P├ęter January 31, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

this is one of the macro limitation..

- probs January 30, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

just replace square(4) with 4*4...
this will look like
64/4*4;
then 64/4 will be evaluated first and the result is multiplied by 4,gives u 64 as answer

- damodarnitt February 01, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

The answer will be 64.
64/4*4.
going from left to right as the precedence goes, 64/4=16, then 16*4=64, which is the result.

- saswat360 February 25, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

The ans will be 64 because the code will excute 64/4 first

- pintu gupta February 25, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

The below program in java returns 4. Actually it is not returning 4*4 here. It is returning 16 instead.
public class Sqare {
static int SQUARE1(int i){
return i*i; }
public static void main(String[] args) {
int s;
s = 64/SQUARE1(4);
System.out.println(s); }}

- Anil February 27, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Hi,

the answer is 64

anyone waiting for a personal interview for Noida like me ?
had my written cleared in Dec 2012, still waiting for the personal interview !
Please do reply..

- SK March 11, 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