Ask Question

Which statement correctly tests int variable var to be less than 0 or more than 50?

+4
Answers (1)
  1. 22 March, 23:16
    0
    if-else statement.

    Explanation:

    if-else is the conditional statement that can be used for checking the condition.

    Syntax of if-else statement:

    if (condition) {

    statement;

    }else{

    statement;

    }

    if the condition put in the if part is TRUE, then the statement inside the if will execute. if the condition put in the if part is FALSE, then the else part will execute.

    In the question for testing the variable var is less than or more than 50, if-else statement is best statement.

    We can used like that:

    if (var50) {

    printf ("Test pass");

    }else{

    printf ("Test failed");

    }
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Which statement correctly tests int variable var to be less than 0 or more than 50? ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers