1 True or False When you have two Boolean expressions joined

1. True or False. When you have two Boolean expressions joined by an or the entire expression will be true if both Boolean expressions are true.

2. True or false. A while loop can have an if statement inside the code block but an if statement can never have a while loop a true branch.

3. When we talk about abstraction, we are referring to __________ the details of the program logic.   A. summarizing

            B. hiding

            C. promoting

                           D. all of the above

4. The three parts and a module are ________, body and return statement

                             A. header

                              B. identifier

                              C. module name

                               D. parameter list

Solution

1.

Answer : False

    property of OR are:-
        i> True or False = True
        ii> False or True = True
        iii> True or True = True
        iv> False or False = False

    Because Boolean expressions either true or false , it will never satisfy (iv)th option

2.
Answer: False

    contradiction:-

     while (1)
     {
        some statement
        - - - - -
        if (True)
        {
            while(1)
            {                     // here while loop inside if statement
                ----
                statement

            }
        }

     }

3. Answer:
         D. all of the above

    Explanation:
        Abstraction is related to both encapsulation and data hiding

4. Answer:
        A. header

when you create a module, you include a header, a body, and a statement.


Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site