Question

UUS TOP Question 17: What is the output of the code presented below? int y = 5; int x 7; intx yPtr = &x; *yPtr = 8 + 4 * 6/2

Question 18: The following is true about the code below. Tine Time: 1 SetMinute(unsigned int ninutes) this.minutes - minutes;

Question 19: What is the output of the code presented below? include <iostream using namespace std; class Number ( int value;

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer 17: Output: 30 45

#include<iostream>

using namespace std;

int main(){

  int y=5;

  int x=7;

// here we are storing the xin yPtr

  int *yPtr=&x;

// so here 8+24/2+10

// 8+12+10=30

//now yPtr=x=30

  *yPtr=8+4*6/2+(5*2);

// here it will print 30

  cout<<*yPtr<<endl;

// now 30+30/2=45

  *yPtr=*yPtr+*yPtr/2;

  cout<<*yPtr;

  return 0;

}

Answer 18:

It is setter method which received min and assign it to the member variable

Answer 19:

it will throw error as value in in Class Number is Private so we can't access the private member variables outside the class

Note : If you like my answer please rate and help me it is very Imp for me

Add a comment
Know the answer?
Add Answer to:
UUS TOP Question 17: What is the output of the code presented below? int y =...
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