Question

What is the output of the PRINTLINE2 from the following code segment?      public static void Main(){...

What is the output of the PRINTLINE2 from the following code segment?

     public static void Main(){

int x = 15;

int y = 55;  

     int z = DoIt(ref x, ref y);

     PRINTLINE(x + “ “ + y + “ “ + z); // PRINTLINE 1

  }

static int DoIt(ref int a, ref int b)

{

  a += 22;

  b -= 12;

  PRINTLINE(a + “ “ + b); // PRINTLINE 2

  return (a - b);

}

0 0
Add a comment Improve this question Transcribed image text
Answer #1
Output of the given code is
37 43
37 43 -6

So, output of the PRINTLINE2 is 37 43

37 43 
Add a comment
Know the answer?
Add Answer to:
What is the output of the PRINTLINE2 from the following code segment?      public static void Main(){...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT