Question

Question 1 The value of the expression c = a + b--, assuming a, b, and c are integer variables and a 3 and b-4.is C = 7; b=4
0 0
Add a comment Improve this question Transcribed image text
Answer #1

SOLUTION-

Correct answer is " (c) c=7 ,b=3 "

(In this expression "b--" is post decrement operator so it will first solve the problem than it will decrement b value .Below is the C++ example code )

main.cpp 1 2 #include <iostream> 3 4 using namespace std; 5 6 int main() 7-{ 8 int a = 3; 9 int b = 4; 10 int c; 11 12 c = a

IF YOU HAVE ANY DOUBT PLEASE COMMENT DOWN BELOW I WILL SOLVE IT FOR YOU:)
----------------PLEASE RATE THE ANSWER-----------THANK YOU!!!!!!!!----------

Add a comment
Know the answer?
Add Answer to:
Question 1 The value of the expression c = a + b--, assuming a, b, and...
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