Answer:
void print_popcorn_time(int bag_ounces){
if(bag_ounces < 3){
cout<<"Too small"<<endl;
}else if(bag_ounces > 10){
cout<<"Too large"<<endl;
}else{
cout<<(6 * bag_ounces)<<"seconds"<<endl;
}
}
Explanation:
The function is the block of the statement which performs the special task.
For checking the condition in the program, the if-else statement is used.
It can check the condition one or two but if we want to check the more than two different conditions then the continuous if-else statement is used.
syntax of continuous if else:
if(condition){
statement;
}else if(condition)
statement;
}else{
statement;
}
In the question, there are three conditions;
1. bag_ounces is less than 3
2. bag_ounces greater than 10
3. else part.
we put the condition in the above if-else statement and print the corresponding message.
Answer:
<u>D. In DMA, interrupt is sent when the task is completed</u>
Explanation:
Note, the term Direct Memory Access simply refers to a computer feature that allows hardware subsystems to directly access the main system memory of a computer, without any the aid of the central processing unit (CPU).
It is a fact that while the transfer process is ongoing, an interrupt (interrupt signal) is not sent until when the task is completed.
A viewport is the viewing area for a web page, which is much smaller on a phone than on a traditional desktop .
Webmasters monitor the server to be sure it is running,Some webmasters decide what kind of computer will hold a websites information ,Some webmasters abuse other sites by exploiting their comment fields.