# Homework Solution: T or F? (1/2(double) 1/2) (1/21/ (double) 2) T or F? (1.0/2(double) 1/2) &&(1.0/21/2.0) Use the stream manipulators setw() and endl to disp…

Very simple for someone who knows C++. Please answer all of them
T or F? (1/2(double) 1/2) (1/21/ (double) 2) T or F? (1.0/2(double) 1/2) &&(1.0/21/2.0) Use the stream manipulators setw() and endl to display the integer number x right-justified in a 5- character, blank-filled field on a line all by itself: that is, mimic the C programming language format specifier "%5dn". Use the stream manipulators setw (), fixed, and setprecision () to display the double- precision number x right-justified in a 10-character, blank-filled field with 3 places after the decimal point: that is, mimic the C programming language format specifier "%10 3f". Fact Each of the 4 expression-statements below produces 3 side effects -2 side effects change the value of i and the 3rd side effect is the output of i to the standard output stream cout. Notes (I) There is a comma operator after each w = 1 expression: and (2) the comma operator is left-to-right associative. T or F? The 4 expression statements display the same value.

Very sincere for someone who knows C++. Please solution entire of them

T or F? (1/2(double) 1/2) (1/21/ (double) 2) T or F? (1.0/2(double) 1/2) &&(1.0/21/2.0) Use the course manipulators setw() and endl to unfold the integer sum x right-justified in a 5- reputation, blank-filled arena on a sequence entire by itself: that is, ape the C programming vernacular format specifier “%5dn”. Use the course manipulators setw (), unroving, and setexactness () to unfold the envelop- exactness sum x right-justified in a 10-character, blank-filled arena with 3 places following the decimal point: that is, ape the C programming vernacular format specifier “%10 3f”. Fact Each of the 4 look-statements underneath yields 3 verge proceeds -2 verge proceeds vary the esteem of i and the 3rd verge commodities is the output of i to the test output course cout. Not attributable attributablees (I) There is a comma operator following each w = 1 look: and (2) the comma operator is left-to-right associative. T or F? The 4 look declarations unfold the similar esteem.

## Expert Solution

23. False

24. True

25.

#include <iostream>

#include <iomanip>

int main(void)

{

std::cout << std::right << std::setw(5) << x << std::endl;

return 0;

}

26.

#include <iostream>     // std::cout, std::fixed

#include <iomanip>

int main()

{

std::cout << std::unroving <<std::setw(10);

std ::cout<<std::setprecision(3)<<std::right<<x;

return 0;

}

27. False, They do not attributable attributable attributable yield the similar esteems. For the 4 declarations. The esteem of I output gain be 2,1,2,1

28. True , they entire extension the esteem of i.

29. False. Postfix has a superior antecedence than preface.

30. thisIsAVeryExtremelyLongIdentfier+=12345678;