What, if anything, prints when each of the following C++ statements is performed? If noth- ing prints, then answer “nothing.” Assume x = 2 and y = 3.

a) ```
cout << x;
```
b) ```
cout << x + x;
```
c) ```
cout << "x=";
```
d) ```
cout << "x = " << x;
```
e) ```
cout << x + y << " = " << y + x;
```
f) ```
z = x + y;
```
g) ```
cin >> x >> y;
```
h) ```
// cout << "x + y = " << x + y;
```
i) ```
cout << "\n";
```


a) 2
b) 4
c) x=
d) x = 2
e) 5 = 5
f) nothing.
g) nothing.
h) nothing (because it is a comment).
i) A newline is output which positions the cursor at the beginning of the next line on the screen.

Computer Science & Information Technology

You might also like to view...

Assuming that bitset b1 contains the bits [0 1 1 0] and bitset b2 contains the bits [1 1 1 1], which of the following expressions returns true?

a. b1.any() b. b1 == b2 c. b1.test( 3 ) d. b2.none()

Computer Science & Information Technology

Application software refers to

a. the programs that make the computer useful to the user b. the operating system c. key words d. pseudocode

Computer Science & Information Technology

List the four guidelines for designing output and content for social media.

What will be an ideal response?

Computer Science & Information Technology

You work for a private organization that contracts out forensic investigations. In the process of examining a suspect's hard drive in the course of an internal investigation, you come across numerous files that are quite obviously child pornography. You turn them over to the local law enforcement, which obtains a warrant and seizes the computer. Which document applies to this situation?

a. FRCP b. FRE c. PMBOX d. None. You were acting privately.

Computer Science & Information Technology