Question
Can you help me answer the following C programming questions! true or false 1. We can use a switch statement based on an double value.
Can you help me answer the following C programming questions!
true or false
1. We can use a switch statement based on an double value.
a. True
b. false
multiple choice
2. What is the result of (2 > 5) ? 3 : 7
a. 7
b. 1
c. 3
d. 0
3. What happens if the switch does not contain a default case and the value for the switch matches none of the cases?
a. execution continues at the end of the switch statement
b. it executes the else for the switch statement
c. it executes the last case
d. it returns to the top and executes the switch again
4. When is the default case executed?
a. only when the wrong type is used with the switch
b. when all of the other cases are matched
c. when none of the other cases are matched.
d. right after the break in a previous case
5. What is the advantage of using a conditional (or terenary) expression?
a. it avoids ever having to use if or switch in your program.
b. it is more efficient than using an if.
c. You can make a decision in an expression without having to use an if.
d. if produces random answers.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started