The correct answer is all of the above.
Answer:
Both if-then and switch is the decision control structure that enables the program to execute a statement or block of codes
Explanation:
This decision control structure always checks for one or more condition and execute true statement “if the condition is true” otherwise it will execute false statement (if present). The “true statement” is compulsory.
In case of “if-then loop”, it executes the true block only if the Boolean expression is true. In a similar way in switch-case, the same happens and instead of else part there will be a “default” statement which is compulsory to be present and it will get executed.
1. D
2. C
it allows citizens to submit anonymous tips to the police
Answer:
char
Explanation:
The character data type written as char holds any single character, numbers and non-printing characters. In java and most programming languages, the value of the character must be placed within single quotes. for example
char c = 'd'
char c = '9'
char c = '\t'
Are all valid declarations of a variable c as char and assigned d, then 9 and then used with a non-printing character (tab ) with the escape sequence.