What is wrong with this case statement -> case (x > 2):
A. cases can't have a test condition
B. cases must be capitalized
C. cases must use a ; and not a :

Answers

Answer 1

Answer:

A: cases can't have a test condition

Explanation:

Under the hood, switch statements don't exist. During the mid-stage of compilation, a part of the compiler will lower the code into something that is easier to bind. This means that switch statements become a bunch of if statements.

A case in a switch statement acts upon the switch value. Think of the case keyword as the value you pass into the switch header:

int x = 10;

switch (x)

{

case (x > 2):

     // Code

     break;

}

// Becomes

if (x(x > 2))

{

// Code

}

// Instead do:

switch (x)

{

case > 2:

     // Code

     break;

}

// Becomes

if (x > 2)

{

// Code

}


Related Questions

Suppose that you have the following definitions:
struct time Type
struct tourType
{
int hr;
double min;
int sec;
string cityName;
int distance;
timeType travelTime;
};
};
a. Declare a variable destination of type tourType.
b. Write C++ statements to store the following data in destination: cityName - Chicago, distance -- 550
miles, travelTime - 9 hours and 30 minutes.
c. Write the definition of a function to output the data stored in a variable of type tourType.
d. Write the definition of a value-returning function tat inputs data into a variable of type tourType.
e. Write the definition of a void function with a reference parameter of type tourType to input data in a
variable of type to tourType

Answers

Suppose that you have the following definitions:struct time Type struct tourTypen the variable destination of type your type are tourType input(){cout<<"Enter the city, distance and time in hr and min"<>destination.city name;

What is C++ statements?

Expression statements. These statements examine an expression for its aspect outcomes or for its go-back value. Null statements. These statements may be supplied in which a declaration is needed with the aid of using the C++ syntax however in which no motion is to be taken.

#include#includethe use of namespace std;struct timeType;struct tourType;tourType destination;tourType input(){cout<<"Enter the city, distance and time in hr and min"<>destination.cityName;cin>>destination.distance;cin>>destination.travelTime.hr;cin>>destination.travelTime.min;go back destination;}void display()cityName;d.distance = t->distance;d.travelTime.hr = t->travelTime.hr;d.travelTime.min = t->travelTime.min;">int main().

Read more about the variable :

https://brainly.com/question/2804470

#SPJ1

3. Which of the following is most likely fake news?
O A. Content from a website that ends in ".edu"
OB. A news site that lists all of its contributing authors
OC. An article that tries to sell you miracle weight loss pills
O D. An academic resource listed in a bibliography

Answers

Answer:

C. An article that tries to sell you miracle weight loss pills

Question2.
What are the functions of information technology?

Answers

Answer:

I) infrastructure

ii) communication

iii) introduces and maintains computerized systems to process data efficiency , etc

Select the items below that are a computer
Pocket Watch
Server
Calculator
Piano
Laptop
Tablet

Answers

Answer:

Laptop is the answer.. .....

Create a defined name for range b6:e6 using walkup as the range name

Answers

In order to create a defined name for the range, one must follow the steps below.

What are the steps to creating a named range?

Step 1 - Select the concerned range (Rows and columns inclusive of the labels)Step 2 - From the Ribbon above, select Formulas. Then select "Create From Selection".From the "Create From Selection" dialogue box, select the option that is indicative of the location of your row / column.Click "Ok".

Learn more about Named Range at:
https://brainly.com/question/13396823
#SPJ1

Q3: What do you mean by a pointer to a pointer? Can this be extended?

Answers

Answer:

hola, te habla mi contestadora si no te contesto seguro no quiero hablar con vos

donde vas si son las 11?

todo el barrio la conoce

Explanation:

le gusta sentirse mala, tiene un tubo en la Sala

para tumbar el club

kiere quedarse dentro del party

será cuestión de tiempo?

conosco tu debilidad

What does an else statement do?
A. gives an alternative to the test conditions
B. always executes
C. nothing

Answers

Answer:

A

Explanation:

If the first condition are not true then it executes else, but if the first condition is true then it ignores the else statement

Which for loop syntax is correct?
A. for {i=0, i<10, i++}
{code block}
B. for (i=0; i<10; i++);
{code block}
C. for (i=0; i<10; i++)
{code block}

Answers

Answer:

C

Explanation:

What are the predominant means by which individuals enter the InfoSec profession?

Answers

InfoSec is a profession with little personnel turnover.

What is the process of ensuring that corporate security policies are carried out
consistently?

Answers

Policy or security and only conscious

Ensuring consistent adherence to corporate security policies involves a systematic approach to implementation and monitoring.

Ask about the process of ensuring that corporate security policies are carried out consistently.

Here are some steps that can be taken to ensure policies are carried out consistently:

1. Policy Development:

Establish clear and comprehensive security policies that cover various aspects such as data protection, access controls, network security, and employee guidelines.

2. Communication and Training:

Effectively communicate the policies to all employees, ensuring they understand their roles and responsibilities in maintaining security.

3. Documentation and Accessibility:

Document the policies in an easily accessible format, such as an employee handbook or an intranet portal. Regularly update and maintain the documentation to reflect any changes or new requirements.

4. Compliance Monitoring:

Implement a monitoring system to track compliance with security policies. This can include conducting internal audits, vulnerability assessments, and security awareness campaigns.

5. Incident Response and Reporting:

Establish a clear process for reporting security incidents or violations. Encourage employees to report any suspicious activity promptly.

To learn more about the security policies visit:

https://brainly.com/question/13169523

#SPJ3

What federal law requires manufacturers to put care labels on their garments and fabrics sold by the yard?

Answers

CARE LABELING RULE which requires manufacturers and importers to attach care instructions to garments.

of
tion
TCP/IP was developed in the 1960s to enable university scientists to locate other computers on the Internet.
Select one:
O True
O False

Answers

Answer:

True

Explanation:

How can MS Word aid healthcare professionals with virtual communication?

Answers

MS Word aid healthcare professionals with virtual communication by the Handled properly, phrase processing promises massive benefits: stepped forward collections, improved coins flow, decreased paperwork, and improved donations to healthcare foundations.

What do nurses use Microsoft Word for?

Personnel control data (demographic and expert information of nursing staff), Resource control/evaluation monitoring for reviews on budgeting DRGs, time beyond regulation usage, affected person care hours, deliver gadget projections, and staffing hours, and.

The Microsoft Office System, coupled with accessories supplied via way of means of partners, promises a portal answer that may offer clinicians and researchers immediate get admission to to the data they need, which includes the present-day scientific magazine articles, drug reference data and affected person handouts.

Read more about the word:

https://brainly.com/question/190029

#SPJ1

SAfe is based on four primary bodies of knowledge#

Answers

SAfe is based on four primary bodies of knowledge that are Agile improvement, Lean product improvement, structures thinking, and DevOps.

What is the number one want for SAFe?

A number one purpose for SAFe is to align improvement to in addition commercial enterprise objectives. SAFe combines learnings from validated agile methodologies to create a platform that meets the necessities for software program improvement inside big organization programs.

SAFe Full Configuration includes 4 ranges: Team, Program, Large Solution and Portfolio. It is continuously being improved, and its ultra-modern model. Fe is primarily based totally on 4 number one our bodies of knowledge: Agile improvement, Lean product improvement, structures thinking, and DevOps.

Read more about the SAfe:

https://brainly.com/question/8430576

#SPJ1

Why is it important not to leave your personal information on a public computer?
A. Other people need a clean computer to use.
B. Someone can steal the information and hurt you.
C. It makes it hard for the next person to log in.
D. It's rude and someone else has to clean up after you

Answers

Answer:

B. Someone can steal the information and hurt you.

Explanation:

People can hack into your accounts using your informations and spread hurtful things that can make people hurt. The people will think that you posted this (even if you didn't) and blame you.

In what ways may the WBS be used as a key document to monitor and control a project?

Answers

By bringing everyone's attention to the work that has to be done, WBS can be utilized to prevent scope creep.

What is WBS?

WBS stands for Work Breakdown Structure. It facilitates task allocation. It is much simpler to allocate work to the proper person when a project is divided into manageable tasks or packages. This assists your team in making plans for tasks that must be accomplished in addition to the job at hand.

Thus, the WBS can be used as a key document to monitor and control a project because it makes the process of quickly creating a timetable easier, By assigning work estimates to particular WBS parts, the required task is described and organized by it.

Learn more about WBS here:

https://brainly.com/question/13090633

#SPJ1

What is the optimal number of members for an Agile team?

Answers

5 or 6 people

Explanation:

Second, for those of you who demand a prefer an answer upfront, here it is – the optimal number of members for an agile team is 5 or 6 people. That is 5 or 6 team members and excludes roles like Scrum Master, Product Owner, and God forbid, Project Manager.

a ___ is a type of computer that is small and portable?

Answers

Answer:

laptop

Explanation:

laptops are small and they can be taken anywhere.

The network layer of the ISO/OSI model organize bits into ..........​

Answers

Answer:

frames

Explanation:

The data-link layer is the second layer from the bottom of the OSI Model. The data-link layer's principal role is to identify errors and merge data bits into frames.

I have a .NET 6 basic website that I built using Entity Framework as the database for updating pages. I am ready to deploy the site/database to a live server somewhere, but I am looking for the best option.

The website is built using the latest .NET Framework 6.0, with Entity Framework 6.0.3. I know about HostGator, GoDaddy and InterServer.

I have read stuff online that said HostGator doesn't actually support the latest .NET 6.0, and GoDaddy only supports .NET Core 3.2?

HostGator is rougly $5.00 a month, GoDaddy is $6.00, and InterServer is $8.00.

I am leaning towards InterServer, because I have read that InterServer supports the latest .NET 6.0 and Entity Framework.

I am used to deploying to servers using LAMP stack, Linux, Apache, PHP, MySQL... The prices there are lower and it is fairly simple to setup. I figure there has to be something similar for windows and .NET.

For something similar, am I looking for Shared Hosting? Or VPS? I really don't understand what I need. I was hoping for Shared Hosting, export my SQL Server database, create it on the live server, then FTP my files over.

InterServer seems like it supports everything, so I am leaning towards that. I know no matter what, Windows Hosting is going to be a little bit more expensive. I just want something that I know is going to work with the latest .NET technologies.

Does anyone have any suggestions?

Answers

In the above scenario, i will recommend Bluehost  or InterServer since it is good and can meet your requirement.

What is Bluehost?

Bluehost is known to be a software that is said to be a little bit better than HostGator in the aspect of  security as it gives offer free SSL certificates, malware tools, and others.

Therefore, In the above scenario, I will recommend Bluehost  or InterServer since it is good and can meet your requirement.

Learn more about Bluehost from

https://brainly.com/question/17062016

#SPJ1

What would you consider before buying a printer​

Answers

Answer:

Printing Quality, Price, If it van vonnect to my laptop or nay devices.

Answer:

to make sure it comes with ink

Explanation:

if not buy some when u purchase it

List and describe four services that comprise IT infrastructure, beyond physical devices and software applications.

Answers

The four services that comprise IT infrastructure are:

Telecommunications services. Data management services . Application software services.Physical facilities management services.

What does these services do?

Telecommunications services is known to help in terms of giving data, voice, and video network.

Data management services helps to save , manage, and analyze all data. Application software services helps to give firms-wide range capabilities.

The Physical facilities management services helps to make and handle physical installations of technology.

Therefore, The four services that comprise IT infrastructure are:

Telecommunications services. Data management services . Application software services.Physical facilities management services.

Learn more about  IT infrastructure from

https://brainly.com/question/869476

#SPJ1

If you want to load the "my-data.csv" file to Dataframe so that you can explore find out the number of data items in the data set, how should you import the required library?

1.import numpy as dataframe

2.import pandas as pd

3.import seaborn as pd

4.import matplotlib.pyplot as pd​

Answers

If a person want to load the "my-data.csv" file to Dataframe one can use import pandas as pd.

What is pandas?

Pandas is known to be a tools that carry out data transformations. It often helps to filter and analyze any kind of data.

Note that for import one can use:

import numpy as np. import pandas as pd.

Therefore, If a person want to load the "my-data.csv" file to Dataframe one can use import pandas as pd.

Hence, the second(2) option is correct.

Learn more about Dataframe  from

https://brainly.com/question/25525005

#SPJ1

Build python

Prompt the user for the length,width and height of a room.


Calculate the area of the floor. (length*width)


Calculate the volume of the room. (length*width*height)


Display the area and volume to the user.


Open a file named “roomdata.txt”.


Write the area and volume to the file.

Answers

Answer:

You'd have to create a "roomdata.txt" file before writing to it.

Explanation:

#Python Geometry

lenght = int(input("Enter lenght: "))

width = int(input("Enter width: "))

height = int(input("Enter height: "))

def floor_area(area);

area = 0

area = lenght * width

return area

def room_volume(vol);

vol = 0

vol = lenght * width * height

return vol

print ("Area of floor = ", floor_area, "/n Volume of room = ", room_volume)

f = open ("roomdata.text", "w")

f.write("Area of floor = ", floor_area, "/n Volume of room = ", room_volume)

f.close()

To stay safe and avoid malware programs you should (choose 3)
a. run updates to your computers operating system
b. turn off your computer
c. install antivirus software and run regular updates and scans
d. click on any antivirus software ads that you see on the internet
d. avoid suspicious-looking ads or downloads when on the internet
f. install every virus software

Answers

Answer:

I would say choose,

A -  run updates to your computers operating system

C - install antivirus software and run regular updates and scans

D - avoid suspicious-looking ads or downloads when on the internet

Identify the cost of non-compliance. What will happen to the organization if they fail to meet compliance?

Answers

The costs of non-compliance are:

FinespenaltiesBusiness disruption.Revenue loss.Productivity loss.

What will happen to a firm is non-compliance?

Non-compliance is one that makes a firm or company to loose millions of dollars in terms of  financial losses, there is also security breaches, license band, business disruptions, and others.

Therefore, The costs of non-compliance are:

FinespenaltiesBusiness disruption.Revenue loss.Productivity loss.

Learn more about  non-compliance from

https://brainly.com/question/17306620

#SPJ1

Give the value of the zero flag, the carry flag, the signflag, and the overflow flag after each of the following instructions if AX is initialized with 0x1254 and BX is initialize dwith 0x0FFF.

a. add ax, 0xEDAB

b. add ax, bx

c. add bx, 0xF001

Answers

The correct answer is A for this question

Add ax, 0xEDAB is the value of the zero flag, the carry flag, the sign flag, and the overflow flag after each of the following instructions if AX is initialized with 0x1254 and BX is initialize dwith 0x0FFF

What is sign flag?

Sign flag is defined as whether the outcome of an arithmetic operation is positive or negative is indicated by a bit in a status byte in the central processing unit of a computer. Architecture determines the size and significance of the flag bits. It often includes data regarding current constraints on CPU operation as well as the outcome of arithmetic operations.

After any operation, the sign flag (S) is set to 1, indicating that the number is negative, if the MSB (B(7)) of the result is 1. Zero Flag (Z): If the outcome of any mathematical or logical operation is 0 (00)H, the zero flag (Z) is set, or 1, otherwise it is reset, or 0.

Thus, add ax, 0xEDAB is the value of the zero flag, the carry flag, the sign flag, and the overflow flag after each of the following instructions if AX is initialized with 0x1254 and BX is initialize dwith 0x0FFF

To learn more about sign flag, refer to the link below:

https://brainly.com/question/12974452

#SPJ2

What’s the main purpose of a personality test?

Answers

Answer:

Which of following is not anelectroyte

Personality tests are designed to systematically elicit information about a person's motivations, preferences, interests, emotional make-up, and style of interacting with people and situations.

write an algorithm to find the area of a circle of radius r

Answers

Answer:

e=mc^2

Explanation:

how does the government us information system to manage traffic flow

Answers

the street lights have timers on them to change naturally, and the roads have wires underneath to feel when a car is waiting so when they feel there’s a lot of people they keep going and then time out and the other lanes get to go
Other Questions
tu blank ( tengas, prefires, y ir) leer una novelas The three waves shown in the picture below are equal in wavelength, but are travelling at different speeds. Given this information, which wave has the highest frequency?Select one:a. 1b. 2c. 3d. Can't tell from the information given. The scale below shows the pH levels of various liquids. Which of the following substances is a strong acid? Natural selection results in ______. Group of answer choices a decrease in the size of a population. an increase in the size of a population. increased genetic variation. offspring adapted to their current environment How does Manifest Destiny connect to Christopher Columbus? use the point-slope formula to write an equation of the line that passes through (6,- 3) and (3,1).Write the answer in slope-intercept form (if possible). What is the value of StartFraction 6 Over x EndFraction + 2x2, when x = 3? Find x and Y pls help Which buffer can be suitable to prepare a solution that needs to be buffered at ph 4? A rational expression simplifies to 3. the denominator of the original expression is given. which polynomial is the numerator? What is the cosiner fade when the sign of fada equals 2/5 What is the inverse of function f?f(x) = 64x3 - 1 The stage of the cell cycle during which the cytoplasm divides to form two cells is called:. An organization needs to setup a(n) _____ infrastructure to issue and sign client certificates what is the main conflict in beowulf 3.12 LAB: Output range with increment of 5 Write a program whose input is two integers, and whose output is the first integer and subsequent increments of 5 as long as the value is less than or equal to the second integer. Ex: If the input is: -15 10 Explain way economic deals with allocation and efficient utilization of scarce resources only? Which statement best describes the purpose of planning for research?OIt helps you figure out what you want to investigate and how.O It will get you an A on your research paper.O The audience will read your research plan to figure out how to read the research paper.O Research plans have replaced the research paper in most universities. In a mixed market economy, government regulations are intended to [ ] both consumers and producers.Those who support regulation in the market argue that these laws [ ] , while those who are against government regulation argue that these laws [ ].Answer options for 1, 2, & 3:1: limit, hurt, protect2: hurt everyone, limit everyone, protect everyone3: are costly, allow excessive freedom, protect wrong doers Which of the following is the best definition of nuclear fusion?A. Nuclear fusion is the release of high-energy photons from anucleus.B. Nuclear fusion is the joining of two or more nuclei into onenucleus.C. Nuclear fusion is the formation of new isotopes through a gain ofelectrons.D. Nuclear fusion is the splitting of a nucleus into two or more nuclei.