there is a function called changevalues(x,y)inside this
function
x=x+y/2
y=y+x+5
end
so
i am calling function in one program as changevalues(y,x)
what is the output if x=2 and y=10(ignore exact programatic
statements)

please can any one provide me answer for this immediately

Answers were Sorted based on User's Feedback



there is a function called changevalues(x,y)inside this function x=x+y/2 y=y+x+5 end so i am ..

Answer / suman.p

Hey guys

x=10+2/2 is supposed to be 11, not 1. Forgot operator precedence?

so, x=11 and y=17.

That's it!

Is This Answer Correct ?    8 Yes 3 No

there is a function called changevalues(x,y)inside this function x=x+y/2 y=y+x+5 end so i am ..

Answer / saravana

x=11
y=18
after execution of first statement x value changes to 11 so in second statement y=2+11+5
so y=18

Is This Answer Correct ?    1 Yes 0 No

there is a function called changevalues(x,y)inside this function x=x+y/2 y=y+x+5 end so i am ..

Answer / suneetha

Ans:

X=6
Y=17

Solution:

changevalues(10,2)

x=10+2/2=6
y=2+10+5=17

Is This Answer Correct ?    4 Yes 7 No

there is a function called changevalues(x,y)inside this function x=x+y/2 y=y+x+5 end so i am ..

Answer / swamy

X=6
Y=17

Solution:

changevalues(10,2)

x=10+2/2=1
y=2+10+5=17

Is This Answer Correct ?    2 Yes 6 No

Post New Answer

More Testing AllOther Interview Questions

What does cots represent?

0 Answers  


Hey friends...mail me interview questions of manual testing.. Give me explanation of Automated Tools quality center on my gmail mca.rachna21@gmail.com quick test profession load runner

0 Answers  


Does anyone have a solution for this?

0 Answers  


When should exploratory testing be performed?

0 Answers  


I would like to know whether Zephyr, the test management tool takes a complex installation procedure.

1 Answers  






Hi, I want to write ISTQB exam. Can anybody send me the material regarding this.

0 Answers  


What is Bug life cycle?

0 Answers   TCS,


what is the exact difference between a product and a project.give an example

4 Answers   Wipro,


What is the major risk or challenge faced by you as QA analyst other than clash with the developer regarding the defect log.

1 Answers  


what are reviews..? In what type of reviews are going to participate?

1 Answers  


In white box testing, what do you verify?

0 Answers  


Which one of the following is used as a tool for tracking an SQA project? 1. Pareto chart 2. PERT chart 3. Run chart 4. Control chart 5. Cause and effect chart

1 Answers   eFunds,


Categories