answersLogoWhite

0

What else can I help you with?

Continue Learning about Engineering

How do you design a function named feetToinches that accepts a number of feet as an argument and returns the number of inches in that many feet?

You design it as an inline function with a constant unsigned reference parameter. Since there are 12 inches to the foot, the return value is the product of the parameter and 12. However, you must also ensure the return type has enough bits to store the result. C++ example: inline unsigned int feetToinches( const unsigned int & feet ){ return( feet < 357913941 ? feet * 12 : 0 ); } The above example assumes an int is 32-bits wide. If the input is larger than 357913941 (feet) then there won't be enough bits to store the result, so zero is returned instead. If the input is non-zero and the return is zero, you know the conversion failed. We use unsigned data types because you cannot have a negative unit of distance. We use a reference parameter to prevent the parameter from being copied (not strictly necessary if the type will fit within a pointer variable, but good practice nonetheless). The parameter is constant because the function does not need to modify the parameter. It is inline because the code is not complicated and is a prime candidate for inline expansion, thus eliminating the need for a function call altogether.


How do you prevent information about your computer being leaked via javascript?

Most browsers allow you to disable cookies. This would prevent any javascript function from collecting data about your computer. Unfortunately, cookies can be very useful. They remember logins and passwords for you, and can help make a webpage more interactive. As long as you stay on safe websites, you shouldn't worry about javascript cookies.


Why low frequencies are not used for data transmission in computer networks?

Low frequencies are avoided for data transmission in computer networks to prevent data loss due to attenuation of the signal. Also, low frequencies are incapable of transferring data at the speeds of higher frequencies.


What is the purpose of an anti static wrist strap?

Believe it or not, static electricity can be very high and this can destroy sensitive IC chips easily. I've seen new ones handled improperly and installed only to find them bad.


How to prevent unauthorized memory access in c?

Make sure a password has been set on the computer and make sure its one that you know is easy to memorize but hard for others to find out. firewall - software firewall is a program that is stored into the computer which protects the computer from unauthorized incoming and outgoing data. virus protection program - that helps stop or detect and fix virus problems from happening.

Related Questions

What can prevent peripheral devices from communicating with the computer?

Best bet ... the plug has fallen out.


What damage can prevent peripheral devices from communicating with the computer?

Best bet ... the plug has fallen out.


What are the key steps you take to configure a server to prevent syn flood attacks?

Choose to add a new DWORD (32 bit) Value parameter and then enable the parameter by entering a data value.


What can prevent peripheral devices from communicating?

A number of things can prevent peripheral devices from communicating. Bad cables, missing drivers, and resource conflicts are on the list. Without the drivers for the ports used and the drivers for the devices on the ports, the devices cannot communicate.


What are the benefits of using the cp parameter in statistical analysis?

The cp parameter in statistical analysis helps to select the most appropriate model by balancing model complexity and goodness of fit. It can prevent overfitting and improve the accuracy of predictions.


What command line parameter will prevent a program executed using runas.exe from accessing the elevated user's encrypted files?

/noprofile


How do you prevent computer viruses infecting your computer?

nhh


How can I fix a check that was written incorrectly?

To fix a check that was written incorrectly, you can void the check and write a new one with the correct information. Make sure to mark the voided check as canceled to prevent it from being cashed.


What can you use to prevent the theft of data from a computer?

You can prevent theft of data from a computer through using strong passwords.


Which classified aef online tool is a means of communicating to leadership conditions that prevent the unit filling taskings?

ART


Can you overcharge your battery on computer?

No. The computer and charger are "intelligent" and will prevent overcharging.


How can I fix a check that has been written incorrectly?

To fix a check that has been written incorrectly, you can void the check and write a new one with the correct information. Make sure to mark the original check as void to prevent it from being cashed.