Answer:
Swap codes in line 7 and 8
Explanation:
The code segment below
Line 1: count ← 0
Line 2: sum ← 0
Line 3: FOR EACH value IN numbers
Line 4: {
Line 5: count ← count + 1
Line 6: sum ← sum + value
Line 7: average ← sum / count
Line 8: }
Line 9: DISPLAY (average)
The above code will make the program translator calculate the average value at each iteration.
This will take a longer time to execute and also means more instructions for the program translator.
Swapping line 7 and 8 will reduce the number of instructions to execute. This will have an instant effect on the time taken to execute the program.
Swapping line 7 and 8 means that, the program translator will only calculate the average after it must have finished calculating the sum of the values in the iteration statement.
Answer:
Following are the program to this question:
#include <iostream>//defining header file
using namespace std;
void OR_gate()//defining a method OR_gate
{
bool a,b;//defining bool vaiable
cin>>a>>b;//input value
if(a or b)//use if block to check condition
{
cout<<"1";//print message
}
}
int main()//defining main method
{
OR_gate();//calling method OR_gate
return 0;
}
Output:
0
1
1
Explanation:
In the above program, a method "OR_gate" is declared, and inside the method two bool variable "a and b" is defined, which input the value from the user end.
In the next step, an if block is defined, that uses the or gate to check input value and print the value that is equal to 1, and inside the main method, it call the "OR_gate" method.
Answer:
The answer of the given question is Inorder.
Explanation:
In the inorder traversal the binary tree start from the root and visited all the vertex in the tree .
The inorder follow the following Algorithm
1. Traverse in the left subtree.
2 Print the data (visit the node ).
3 Traverse in the Right subtree.
Answer:
style inheritance
Explanation:
What happens when a property on an element has no value supplied is governed by style inheritance. A property should inherit its value from its parent element, according to this specification.
Answer:
These technologies are: Dual Stack Routers, Tunneling, and NAT Protocol Translation.
Explanation:
Dual Stack Routers - This is the process in which a router’s interface is attached with IPv4 and IPv6 addresses
Tunneling -Tunneling is used as a medium to help the different IP versions communicate with the transit network.
NAT Protocol Translation - This helps the IPv4 and IPv6 networks communicate with each other since they do not understand the IP addresses of each other since, they are different IP versions.