Answer:
The function definition to this question can be given as:
Function definition:
void printAttitude(int x1) //define function printAttitude.
{
//nested else-if statements
if(x1==1)
//if block
cout<<"disagree"<<endl;
//message
else if(x1==2)
//else if block
cout<<"no opinion"<<endl;
//message
else if(x1==3)
//else if block
cout<<"agree"<<endl;
//message
else
cout<<" ";
}
Explanation:
In the above method definition firstly, we define a method that is "printAttitude". In this method, we pass an integer variable that is "x1". This function does not return any value because its return type is void. In this method, we use nested else-if statements. The description of these conditions can be given as:
- In the if block we check the variable x1 value is equal to 1 If this condition is true. It will print "disagree" otherwise it will go to else-if block.
- In the else-if block, we check the variable x1 value is equal to 2 if the condition is true. It will print "no opinion". otherwise, we will go to another else-if block.
- In this block, we check the variable x1 value is equal to 3 if this condition is true. It will print "agree".otherwise it will go to else block.
- In the else block it will print nothing.
<span>Random access memory.
This problem requires you to know what the different types of memory are and their relative advantages and disadvantages. Let's look at them and see why 3 are wrong and one is correct.
read-only memory: Otherwise known as ROM, this type of memory stores code that can't be over written. Used frequently for constant lookup values and boot code. Since it can't be written to by normal programs, it can't hold temporary values for Samantha. So this is the wrong choice.
random-access memory: Otherwise known as RAM, this type of memory is used to store temporary values and program code. It is quite fast to access and most the immediately required variables and program code is stored here. It can both be written to and read from. This is the correct answer.
hard disk: This is permanent long term readable and writable memory. It will retain its contents even while powered off. But accessing it is slow. Where the contents of RAM can be accessed in nanoseconds, hard disk takes milliseconds to seconds to access (millions to billions of times slower than RAM). Because it's slow, this is not the correct answer. But it's likely that Samantha will save her spreadsheet to hard disk when she's finished working with it so she can retrieve the spreadsheet later to work on again.
compact disk: This is sort of the ROM equivalent to the hard disk. The data stored on a compact disk can not be over written. One way of describing the storage on a compact disk is "Write Once, Read many times". In most cases it's even slower than the hard disk. But can be useful for archiving information or making backups of the data on your computer.</span>
Register, google CPU registers for more info
One step is to right click on the word to add it to her personal dictionary. or, <span><span>Press F7. Word starts the spelling and grammar checking utility. </span><span>Make corrections, as appropriate, when prompted.
</span></span>
However, one can create a macro that would do the conversions :
1) Identify a list of words whose spelling you want to convert.2) Turn on the macro recorder. 3) Use the Replace feature to replace the spellings.4) Turn off the macro recorder.
The macro will do a conversion from one to the other. Later, as we have more words that need to be automatically replaced, we can just edit the macro and add those words.