Question

5. From the above program the statement while(S2 & P2IN); will a) loop forever b) loop as long as S2 is not pressed c) loop as long as S2 is pressed d) loop 20000 times
0 0
Add a comment Improve this question Transcribed image text
Answer #1

The correct answer for the question is Option :C

The operator '&' means it does AND operation.it is true if both the values are true.

Add a comment
Know the answer?
Add Answer to:
5. From the above program the statement "while(S2 & P2IN); ' will a) loop forever b)...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • How many times is the loop body of the while statement executed?

     How many times is the loop body of the while statement executed? a. once b. forever C. 49 times d. 50 times e. until a number 50 or larger is entered The value stored in variable s at the end of the execution of the loop could best be described as: a. the average of the numbers scanned b. the sum of the numbers scanned c. the largest of the numbers scanned d. how many numbers were scanned e. the sentinel value The value stored in variable z at the end of the...

  • C++ 4. Write a program that inputs 5 scores using a do while loop and asks...

    C++ 4. Write a program that inputs 5 scores using a do while loop and asks a user whether to continue or not ("yes" or "no il pressed you continues if pressed no' terutiinales) then calculates the average. 5. Make a program calculates sales for its division and quarterly earnings and show the total sum. Use 5 by 2 array matrix 6. This is an extra credil questioni Produce a program that displays by decreasing or decremeniting by 4 starting...

  • in c++ language 1.Re-write the following for loop statement by using a while loop statement: int...

    in c++ language 1.Re-write the following for loop statement by using a while loop statement: int sum = 0; for(int i=0;i<=1000;i++){                 sum+=i; } 1 (b). Following is the main () function of a program. The program asks a user to enter 150 integers and print the largest integer user entered. int main() {    int score, highest;             //missing portion of the program             return 0;    } 1(c). Find the missing portion of the following code, so the...

  • C++ program by using while loop structure. Write an interactive program (C++) to prompt and read...

    C++ program by using while loop structure. Write an interactive program (C++) to prompt and read two float type numbers, Then your program should perform and print the following arithmetic: (use while loop structure to repeat program 2 times. 1) Sum 2)Difference 3) Product 4) Quotient 5) Modulus (use system defined fmod function) You must use system's defined function prototype and/or to create programmer's defined function prototype for each of the above calculation. In addition, create a function called "DISPLAYLINE...

  • Objectives: Use the while loop in a program Use the do-while loop in a second program...

    Objectives: Use the while loop in a program Use the do-while loop in a second program Use the for loop in a third program Instructions: Part A. Code a for loop to print the Celsius temperatures for Fahrenheit temperatures 25 to 125. C = 5/9(F – 32).Output should be in a table format: Fahrenheit Celsius 25 ? . . . . . . . . Turn in the source and the output from Part A. Part B. Code a while...

  • Please help - Bash Given the following while loop while Sx -le 5 ie echo "Say...

    Please help - Bash Given the following while loop while Sx -le 5 ie echo "Say Hello Sx times" x-( $x 1) done Write the above loop using a until statement to produce the same result.

  • 1. (a) Before entering any while loop, the while loop condition is. . . A. true...

    1. (a) Before entering any while loop, the while loop condition is. . . A. true B. false C. true or false (b) At the beginning of each iteration, a while loop condition is. . . A. true B. false C. true or false (c) When the loop terminates, a while loop condition is. . . A. true B. false C. true or false (d) Which of the following statements will not cause a compile-time error? A. byte b =...

  • USE of C++ please Write a program that achieves the following requirements: 1. A while/do-While loop...

    USE of C++ please Write a program that achieves the following requirements: 1. A while/do-While loop that will ask the user to input an integer on each iteration. The loop keeps a running total of the input and exits only when the total exceeds the first input times 10. 2. A for loop that does the exact same thing. The program should print out the *new* total each time the total is input.

  • Matlab ( True or False questions ) Statement while - end does not need a "conditional...

    Matlab ( True or False questions ) Statement while - end does not need a "conditional expression" Given a recursive problem, there is only one way to program a while - end loop A while - end loop will run forever unless one statement alters the "conditional expression" The loop while -9 == -9 end will not run forever Counting by one is always done by statement i = i + 1 Dividing 1 by 27 can be accomplished by...

  • Write a C++ program. Using the while loop or the do – while loop write a...

    Write a C++ program. Using the while loop or the do – while loop write a program that does the following: Calculate the average of a series of homework grades (0 - 100) entered one at a time. In this case the lowest score will be dropped and the average computed with the remaining grades. For example suppose you enter the following grades: 78, 85, 81, 90, 88, 93 and 97.The average will be computed from the 6 grades 85,...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
Active Questions
ADVERTISEMENT