Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

QUESTION 1 What will this snippet display? int a = 10, b = 3; double c = 1.4; c

ID: 3673158 • Letter: Q

Question

  

QUESTION 1

What will this snippet display?

int a = 10, b = 3;

double c = 1.4;

c = a / b;

cout << c<< endl;

3.333

3

1.333

10

10 points   

QUESTION 2

What is the value of the boolean variable test?

int a = 5;

int b = 7;

int c = 10;

bool test (! ((c % a == 0) || (a * b >50)));

cout << test << endl;

3

1

0

2

10 points   

QUESTION 3

Will the following code compile?

#include<iostream>

#include<string>'

using namespace std;

char q;

int main()

{

string year;

cout << "Enter your graduation year ";

cin >> year;

cout << " Your graduation year is: " << year;

system("pause");

return 0;

}

True

False

10 points   

QUESTION 4

What will this program display?

2, 1

1, 1

2, 2

1, 2

10 points   

QUESTION 5

What header files are needed for this code? select all that apply.

int main()

{

string var;int zip;

cout << "Enter your zip code ";

getline(cin, var);

stringstream(var) >> zip;

cout << "Your zip code entered is: " << zip << endl;

cout << " Enter a letter to exit." << endl;

cin >> q;

return 0;

}

<iostream>

<fstream>

<string>

<sstream>

a.

3.333

b.

3

c.

1.333

d.

10

Explanation / Answer

Q1. 3
Q2. 0 or false
Q3. False, error: ‘System’ was not declared in this scope
Q4. Question is not given
Q5. a- #include<iostream>
#   d. include<sstream>

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote