Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Really needing step by step help figuring out how to proper answer these questions. What is printed out below?: int a,b; // Assume header files

Really needing step by step help figuring out how to proper answer these questions.
What is printed out below?:
int a,b; // Assume header files correct.
a = (13 % 5 + 2) * 2 / 6 + 4 + 2 * (8 / (22 % 10) - 3);
cout << endl << "a is: " << a << " ; ";
b = static_cast(7.8 + static_cast(15 % 3) / 2);
cout << " b is: " << b << endl;
Given the code snippet below, what is the value of c that is printed?
int a = 3, b = 4, c;
a = 3; b = 4;
a *= b;
c = ++a * b--;
cout << "c is: " << c ;
Given the following input in the input stream, what would be stored in the variables after the following code executes.
Input stream:
181.7%abcd%12
int i;
float f;
char ch;
cin >> i;
cin >> f;
cin >> ch;
What is the output of the following code?
#include
//#include
using namespace std;
int main() {
int i1 = 10;
cout >> right << setw(5) << setfill($) << I1 << endl
return 0;
}
Given the following input in the input stream, what would be stored in the variables after the following code executes.
// Input stream : ab1%2Yu9
char ch;
cin.get(ch);
cout << "#Output 1 " << ch << endl;
cin.ignore(5, '%');
ch = cin.peek();
cout << "#Output 2 " << ch << endl;
cin.get(ch);
cin.putback(ch);
cin.get(ch);
cout << "#Output 3 " << ch << endl;
cin.get(ch);
cout << "#Output 4 " << ch << endl;
system("pause");
return 0;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Types of Interpersonal Relationships?

Answered: 1 week ago

Question

Self-Disclosure and Interpersonal Relationships?

Answered: 1 week ago