1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Alinara [238K]
3 years ago
10

Different between if/else structure and switchstructure in c and c++, why switch statements is more efficientthan using multiple

if/else statements?
Computers and Technology
1 answer:
ad-work [718]3 years ago
7 0

Answer:

Explanation:

Hello, great question. These types are questions are the beginning steps for learning more advanced Coding Problems.

If/Else statements receives an input and compares it to a true of false statement, if it is true then one function is called. Otherwise another function is called. IF/Else statements only have two outcomes which is why they are many times nested one on top of the other to be able to produce more outcomes.

Switch Statements receive and input and compares it to a set of predefined answers. If the right answer is found then the function relating to that answer is called. Otherwise the default function is called.

IF/Else is only more efficient than Switch statements if the inputted value is not predictable enough to make a predefined set.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

You might be interested in
I was just called a man in a wig ugh <br><br> Any tips for doxxing someone?
kondaur [170]

Answer:

Explanation:

hope this help

6 0
2 years ago
Which of the following accurately describe the
Ronch [10]

Answer:

I can get a few months ago but the other use of the way you can you are you have a few weeks ago

3 0
3 years ago
Read 2 more answers
Building relationships during your career exploration is called
elena-s [515]
Building relationships during your career exploration is called networking. This is when you are forming relations with those around you so that opportunities may turn up.

Your answer is: Networking 

Have an great day mate!
6 0
4 years ago
Read 2 more answers
What is the purpose of a mail merge field?
goblinko [34]

Answer:

Mail Merge is a way to send the same message to a large number of persons, with each one properly addressed to a specific person.

Explanation:

8 0
4 years ago
Read 2 more answers
What happens when variables in programming are not properly initialized? answers?
Romashka-Z-Leto [24]
Errors in compilation happen, or it runs but then doesn't recognize the input. Also you can't transform into other types of variables.
6 0
3 years ago
Other questions:
  • You're trying to decide which disk technology to use on your new server. the server will be in heavy use around the clock every
    10·1 answer
  • Computers heat resistant materials breathing systems for fire fighters food-growing technologies improvements in all of the item
    14·1 answer
  • If we are using an 4-character password that contains only lowercase English alphabetic characters (26 different characters), ho
    15·2 answers
  • All of the following are examples of service learning opportunities exept
    11·1 answer
  • Generally speaking, problems are rarely caused by motherboards. However, there are some instances in which a motherboard can fai
    12·1 answer
  • Does trend in computing important for organization management?​
    8·1 answer
  • A file named loan.html, write an HTML document that looks similar to figure 9-7 in the textbook. Write four functions with these
    8·1 answer
  • 8.
    9·1 answer
  • What is the meaning of FTTH
    9·2 answers
  • A _____ is an Access database object that allows you to arrange the fields of a record in any layout so you can enter, edit, and
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!