Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Math & Sciences (https://www.askmehelpdesk.com/forumdisplay.php?f=402)
-   -   For ( expr1 ; expr2 ; expr3 ) { statement; } Which two statements are true? A. This (https://www.askmehelpdesk.com/showthread.php?t=831311)

  • Mar 25, 2017, 05:36 AM
    thomas batycki
    For ( expr1 ; expr2 ; expr3 ) { statement; } Which two statements are true? A. This
    for ( expr1 ; expr2 ; expr3 ) {
    statement;
    }
    Which two statements are true?

    A. This is not the only valid for loop construct; there exits another form of for loop constructor.
    B. The expression expr1 is optional. It initializes the loop and is evaluated once, as the loop begin.
    C. When expr2 evaluates to false, the loop terminates. It is evaluated only after each iteration through
    the loop.
    D. The expression expr3 must be present. It is evaluated after each iteration through the loop.

    Assuming all spelling is fine:
    option B and C is correct or A and C
    Is triky question, for me is B and C. True?
    Thanks
    Thomas

  • All times are GMT -7. The time now is 12:37 PM.