Question

I need some help with C++ and im using the program Atom


Q3: Predict output from following program. #include <iostream> using namespace std int a 1, b 3; cout<ca+st+b<cendl; I/ line
0 0
Add a comment Improve this question Transcribed image text
Answer #1

ANSWER:-

#include <iostream>

using namespace std;

int main() {

int a=1,b=3;

cout<<a++<<++b<<endl; // OUTPUT : 14

cout<<5-a++<<endl; // OUTPUT : 3

cout<<(a++)*(b++)<<endl; // OUTPUT : 12

cout<<(b=2+(a=b+(a=a-1)))<<endl; // OUTPUT : 10

cout<<(a=a+(a<b)+ ++b)<<endl; // OUTPUT : 20

return 0;

}

Add a comment
Know the answer?
Add Answer to:
I need some help with C++ and im using the program Atom Q3: Predict output from...
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