Question

1. True/False: An infinite loop occurs in a pre-test loop when a test condition can never...

1. True/False: An infinite loop occurs in a pre-test loop when a test condition can never be met.

    

2. True/False: An infinite loop occurs in a post-test loop when a test condition can never be met.

3. True/False: The following statement will generate a loop with four iterations:

                           for(count = 4; count > 0; count--)

4. True/False: The problem with a do...while loop is that the test condition cannot be a compound condition.

5. True/False: The following test condition is not valid because the toLowerCase() method cannot be included as part of a test condition:        while(toLowerCase(string)

6. True/False: If num is an integer variable, num++ and ++num can be used interchangeably in any program since the results will always be the same.

7. True/False: In the string.fromCharCode() method, string should be the name of the variable you are using in your program.

8. True/False: The string.fromCharCode() method is a static method.

9. True/False: All the ASCII characters are included in the Unicode Standard.

10. True/False: The charCodeAt() method changes the Unicode value of the character at the specified index in a string to its ASCII value. Then it returns the alphanumeric character that corresponds to the ASCII value.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

I am answering all the questions. Let me know in comments if you have any issue in any of it

1. True

2. True

both pre and post test loops run till the condition is met, if condition is not met, then it runs infinitely

3 True

With count = 4,3,2,1

4. False, we can have compound instruction in do while loop too

5. False

6. False, one is pre increment, and one is post increment, both has different impact

7. False

8. True

9. True

10. False

Add a comment
Know the answer?
Add Answer to:
1. True/False: An infinite loop occurs in a pre-test loop when a test condition can never...
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
  • 31. True or False: The condition in the following if statement is a syntax error:

     31. True or False: The condition in the following if statement is a syntax error: int number=50;…… if (number)…… 32. True or False: The standard C functlon strlen) will return 4 when invoked upon the varlable name, declared below: char namel = (e', 'p', 't', 's', '\0', '1', '2', '1', '\0']; 33. True or False: A structure is a collection of related variables under one name. 34. True or False: In C, output parameters allow for a function to return more than one value Indirectly. 35. True or...

  • Question 21 The loop condition can be a complex condition involving several operators. True OR False...

    Question 21 The loop condition can be a complex condition involving several operators. True OR False Question 22 final int MAX = 25, LIMIT = 100; int num1 = 12, num2 = 25, num3 = 87; if(num3-5 >= 2*LIMIT) { System.out.println ("apple"); } else { System.out.println ("orange"); } System.out.println("grape"); What prints? A. Apple B. Orange C. Grape D. apple grape E. orange grape F. Nothing. Question 23 When we use a while loop, we always know in advance how many...

  • DIRECTIONS FOR THE WHOLE PROJECT BELOW BigInt class The purpose of the BigInt class is to...

    DIRECTIONS FOR THE WHOLE PROJECT BELOW BigInt class The purpose of the BigInt class is to solve the problem using short methods that work together to solve the operations of add, subtract multiply and divide.   A constructor can call a method called setSignAndRemoveItIfItIsThere(). It receives the string that was sent to the constructor and sets a boolean variable positive to true or false and then returns a string without the sign that can then be processed by the constructor to...

  • review for the final 1. (1 point) Mark True or False in the left side of...

    review for the final 1. (1 point) Mark True or False in the left side of problems. (1) We can declare an array of string as string) greetings = {"good", "excellent"); (2) To declare and initialize an int variable i to be 2, we can write int=2; (3) For a properly declared and initialized int variable num, a condition to represent that num is between 10, 100) is written as (num >= 0 || num < 100). (4) Every nested...

  • QUESTION 1 Which statement results in the value false? The value of count is 0; limit...

    QUESTION 1 Which statement results in the value false? The value of count is 0; limit is 10. (count != 0)&&(limit < 20) (count == 0)&&(limit < 20) (count != 0)||(limit < 20) (count == 0)&&(limit < 20) 10 points    QUESTION 2 If this code fragment were executed in an otherwise correct and complete program, what would the output be? int a = 3, b = 2, c = 5 if (a > b) a = 4; if (...

  • QUESTION 21 while True: , in Python, can be used to create an infinite loop. True...

    QUESTION 21 while True: , in Python, can be used to create an infinite loop. True False 2 points    QUESTION 22 The Python Framework does inform you where an error occurred True False 2 points    QUESTION 23 ____ is a critical component to being able to store data and information long term. File Access Memory Print function with 2 points    QUESTION 24 Error handling is also known as ___ handling Result Recursion Exception Crash 2 points   ...

  • visual basic help DI Question 3 2 pts You may only bind an object to a control that the computer creates for you O True O False D | Question 4 2 pts The Do..Loop statement can be used to code b...

    visual basic help DI Question 3 2 pts You may only bind an object to a control that the computer creates for you O True O False D | Question 4 2 pts The Do..Loop statement can be used to code both a pretest loop and a posttest loop. True False Question 5 2 pts You can prevent many unintentional errors from occurring in an application by declaring the variables using the maximum scope needed. True False 2 pts Question...

  • C++ help! #4,6,7 c) no-test d) loop-test e) None of these 1. Which of the following...

    C++ help! #4,6,7 c) no-test d) loop-test e) None of these 1. Which of the following variable names is invalid? a) numstudents b) 2Darray c) studentHame d) test Grade 祁.which of the following conditions is true ifX has a value of 10 and T has a value of 20? None of these 2. In Ca4, the operator indicates: a) subtraction b) negation c) equality e) None of these . What are the final values of z and y after the...

  • Name: True/False & Multiple Choice (2 points each) (True / False ) 2 A char literal...

    Name: True/False & Multiple Choice (2 points each) (True / False ) 2 A char literal '2', a string literal "2", and the numeric literal 2 are identical and stored the same way though they are different types. 3 Since comments do not affect the program execution, you don't need to have it at all. 4. After the following statements are executed, the value of the variable rem is 3. 1. A preprocessor directive line starts with a pound sign...

  • 1.Write a function called high_point that takes a list of integers and returns True if there...

    1.Write a function called high_point that takes a list of integers and returns True if there exists a value in the list that is bigger than the values immediately before and after it in the list. Your function must return False if no such value exists. The values in the beginning and the end of the list cannot be high points. (20 points) Test Cases: print(high_point([2,5,8,9,7,9])) True print(high_point([2,5,6,6,3])) False print(high_point([2,5,8,21,22])) False 2. Write a while loop to repeatedly ask for...

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
ADVERTISEMENT