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
In addition to letting people share files, what is the most useful feature of
bekas [8.4K]

Explanation:

B. They combine and compress large files into a zip file for sending through email

5 0
2 years ago
What is the global marketplace
bija089 [108]

Answer:

A: All the customers for a product or service in all areas of the world

Explanation:

The global marketplace is considered to be the sum of all the people in the whole world who might want to consider buying your products.  Having a global market of clients worldwide can have a huge impact for the company. It can generate sales, and in addition create more jobs and ride out regional economic instabilities. A global marketplace can easily be put as local marketplaces joined together into one larger market.

6 0
3 years ago
Windows service accounts will use passwords consisting of at least 15 characters.
vichka [17]
False because u need 16 letters
4 0
3 years ago
When filtering for unique values only, ______ will be hidden from view
alukav5142 [94]
Greetings. 


l think it is going to be history. Hope it helped 

If not plz let me know
4 0
4 years ago
A rootkit uses a directed broadcast to create a flood of network traffic for the victim computer.a. Trueb. False
Lady_Fox [76]

Answer:

The following statement is False.

Explanation:

The following statement is not true because the rootkit is an application that provides unauthorized access to the computer or any program and it is the software that is intended to harm the computer system. So, that's why the rootkit is not used to create a flood of the network traffic in the user's system.

6 0
3 years ago
Other questions:
  • 11) Write the definition for a child class of Circle named Cylinder. The cylinder should have a double attribute named height. T
    12·1 answer
  • If you see ##### in a cell, you should
    10·1 answer
  • When performing conflict management, it is important to identify your;
    6·1 answer
  • Read the sentence.
    10·1 answer
  • For each of the following polynomials, apply either the Muller's method or the Bairstow's method to find all real or complex roo
    15·1 answer
  • What is the correct html element for playing audio files?
    11·1 answer
  • How to use function in python
    10·1 answer
  • if someone has become very attached to their mobile device and feels anxious if the cannot connect to the internet, what are the
    7·1 answer
  • O
    14·1 answer
  • Which of the following correctly calculates the
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!