Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

n the Visual Studio Ct compilet, what color are comments a Green b. Blue c. Redd

ID: 3675920 • Letter: N

Question

n the Visual Studio Ct compilet, what color are comments a Green b. Blue c. Redd Black 2. Lines beginning with the a comment let the computer know that the test ofthe ine is 3. Which of the following is an invalid variable name? a begin b. end 4 Which statement is false? a Variables may be defined after they are used in calculations b. All variables must be defined. c. All variable definitions must include the name and data type of each variabile d. Several variables of the same data type may be defined in one dfinision S When a number gets assigned to a variable that already has a value, what happems a the new number overwrites the previous value at that memory location b. the new number gets assigned to a neighboring memory location c the computer issues an error d. the new value is destroyed and the old value remains 6. Which statement will find the remainder when 15 is divided by 67 d.a=15.6; c, a=15-6; a-15/6; b. a.. 15 % 6; a. 7. Which of the following is used for the AND operator? c. & b. ) S. Which of the following Java keywords are used f b. if .. then c if. for two-way selection else d if .teeise a. if

Explanation / Answer

1. option (a) Green

2. option (a) // is used for comments

3. option (c) number should not be used in start of variable name

4.    option (a) variables cannot be used before intitialization

5. option(a) the number overites the previous value

6. option(b)

7. option(a)

8. option(c)

9. option(b) 1 2 3 4 5 with spaces

10. option(a) multiple of 3 les than 30 will be last

11. option(a) ( a%b == c)

12 option(b) loop is executed on +y only five times and y++ one time.

13. option(a) multiples of 2 printed after 1

14. option(b)   loop is executed on +y only five times and y++ one time.

15. -5 expression evaluated from right

16. option(b) case 8 will be implemented and 2 is added to num

17. option(d) . else statement executed as number % 5 != 0

18. option(c) both variables will be different as the language is case sensitive.

19. option(c) CD will be printed as number is not equal to 0 but is less than 3

20. option(a)  the number overites the previous value

bonus. option (b) False as b is less than c