got some noob c++ questions that hope someone can help me with
---The statement
while ( --counter >= 1 )
counter % 2 ? cout << "A" : cout << "B";
cannot be rewritten as:
a. while ( --counter >= 1 )
if ( counter % 2 )
cout << "A";
else
cout << "B";.
b. while ( counter >= 1 )
if ( counter % 2 )
cout << "A";
else
cout << "B";.
--counter;
c. while ( counter > 1 )
{
--counter;
if ( counter % 2 )
cout << "A";
else
cout << "B";
}.
--- In a switch structure:
a. A break is required after each case.
b. Multiple actions do not need to be enclosed in braces.
c. A default case is required.
d. A break is required after the default case.
---Which of the following is false?
a. break and continue statements alter the flow of control.
b. continue statements skip the remaining statements in current iteration of the body of the loop in which they are embedded.
c. break statements exit from the loop in which they are embedded.
d. continue and break statements may be embedded within all C++ control statements.
.---Which of the following is false?
a. The effects of break and continue statements can be achieved by structured programming techniques.
b. break and continue statements can perform faster than their corresponding structured techniques.
c. Many programmers feel that break and continue violate structured programming.
d. You should always try to write the fastest, smallest code possible before attempting to make it simple and correct.
thanks so much if can help,