Answer:
void bubble_sort( int A[ ], int n ) {
int temp;
for(int k = 0; k< n-1; k++) {
// (n-k-1) to ignore comparisons of already compared iterations
for(int i = 0; i < n-k-1; i++) {
if(A[ i ] > A[ i+1] ) {
// swapping occurs here
temp = A[ i ];
A[ i ] = A[ i+1 ];
A[ i + 1] = temp ;
}
}
}
}
Given:
voltage, V = 3600V
step-up voltage, V' = 100000 V
Resistance of line, 
Solution:
To calculate % heat loss in long distance power line:
Power produced by AC generator, P =
W
P = 180000 W = 180 kW
At step-up voltage, V = 100000V or 100 kV
current, I = 
I = 
I = 1.8 A
Power line voltage drop is given by:



Power dissipated in long transmission line 
Power dissipated in long transmission line
= 324 W
% Heat loss in power line, 
% Heat loss in power line, 

Answer with Explanation:
There are various factors that needed to be taken into account while deciding the factor of safety some of which are summarized below as:
1) Importance of the structure: When we design any structure different structures have different importance in our society. Take an example of hospital, in case a natural disaster struck's a place the hospital should be the designed to withstand the disaster as it's role in the crisis management following a disaster is well understood. Thus while designing it we need it to have a higher factor of safety against failure when compared to a local building.
2) Errors involved in estimation of strength of materials: when we design any component of any machine or a structure we need to have an exact idea of the behavior of the material and know the value of the strength of the material. But many materials that we use in structure such as concrete in buildings have a very complex behavior and we cannot estimate the strength of the concrete absolutely, thus we tend to decrease the strength of the concrete more if errors involved in the estimation of strength are more to give much safety to the structure.
3) Variability of the loads that may act on the structure: If the loads that act on the structure are highly variable such as earthquake loads amd dynamic loads then we tend to increase the factor of safety while estimating the loads on the structure while designing it.
4) Economic consideration: If our project has abundant funds then we can choose a higher factor of safety while designing the project.
Answer:
The statement is as follows:
Explanation:
We had better avoid such correlated subqueries by instead using aggregation with GROUP BY:
SELECT
c.email_address,
COUNT(DISTINCT o.order_id) AS num_orders,
COALESCE(SUM(oi.quantity * (oi.item_price - oi.discount_amount)), 0) AS total_amount
FROM customers c
LEFT JOIN orders o
ON c.customer_id = o.customer_id
INNER JOIN order_items oi
ON o.order_id = oi.order_id
GROUP BY
c.customer_id,
c.email_address;
Answer:
Explanation:
effective delay = delay when no traffic x 
effective delay = 