BR Power Generation Company Limited (BRPL)
Post: Assistant Manager (ICT)
Exam Date: 29.03.2024, Exam Taker: BUET

KVL at Node \(i_1 = \Sigma V = 0\)
The equation is:
\(-V_{x} + 10 i_{1} + 4 V_{x} + 15 i_{1} = 0\)
\(25 i_{1} + 3 (-5i_{1}) = 0\)
\(i_{1} = 0 \, \text{amp}\)
The voltage across terminals \(V_{ab}\) is:
\(V_{ab} = 15i_{1} = 0V\)
Finally, the Thevenin voltage:
\(V_{TH} = 0V\)

KVL at \(i_{1}: \Sigma V = 0\)
The equation is:
\(-V_{x} + 10 i_{1} + 4 V_{x} + 15 (i_1 + i_{0}) = 0\)
Simplifying:
\(3 V_{x} + 25 i_{1} + 15 i_{0}\) = 0
=>\(3 (-5 i_{1}) + 25 i_{1} + 15 i_{0}\) = 0
=>\(15 i_{0} + 10 i_{1} = 0 \quad \dots \text{(1)}\)
KVL at \(i_{0}: \Sigma V = 0\)
The equation is:
\(-V_{x} + 10 i_{1} + 4 V_{x} + 15 (i_1 + i_{0}) = 0\)
Simplifying:
\(-1 + 15 (i_{1} + i_{0}) \) = 0
=>\(15 i_{0} + 15 i_{1} = 1 \quad \dots \text{(2)}\)
solving (1,2) io = – 2/15 amp
So Rth= 1/io= -15/2 = -7.5 ohm


Voltage at Point a:
Va = -(6/2) V1
Va = -3 V1
Voltage at Point b:
Vb = -(8/4)V2
Vb = -2V2
Summing amplifier:
V0 = -(10/5)Va-(10/15)Vb
V0=-2Va – (2/3)Vb
V0=-2(-3V1) -(2/3)(-2V2)
V0 = 6 V1 + (4/3) V2
= 8.667
#include <stdio.h>
// Function to sort the array using simple bubble sort
void sort(int arr[], int n) {
int i, j, temp;
for(i = 0; i < n-1; i++) {
for(j = 0; j < n-i-1; j++) { if(arr[j] > arr[j+1]) {
temp = arr[j];
arr[j] = arr[j+1];
arr[j+1] = temp;
}
}
}
}
int main() {
int n, k;
printf("Enter number of elements: ");
scanf("%d", &n);
int arr[n];
printf("Enter %d elements:\n", n);
for(int i = 0; i < n; i++) { scanf("%d", &arr[i]); } printf("Enter value of k: "); scanf("%d", &k); if(k > n) {
printf("k must be less than or equal to n\n");
return 0;
}
// Sort the array
sort(arr, n);
// kth smallest element
printf("The %dth smallest element is: %d\n", k, arr[k-1]);
return 0;
}
Sample Input: Enter number of elements: 5 Enter 5 elements: 12 5 7 3 9 Enter value of k: 2 Sample Output: The 2th smallest element is: 5
Find the firstname of customers who order all products which Categoty = ‘B’ and OrderDate = ’15 March 2024’;
Find the TotalOrder as Monetary Amount which is ordered between the date 15 March 2024 and 29 March 2024
| Customer | Product |
|---|---|
| customerID, firstname, lastName OrderDate OrderAmount | ProductId, OrderID, Category |
| Employee | Order |
| EmpID, EmpName EmpBirthDate EmpRegion EmpMobile | OrderID ProductID OrderNo CustomerID TotalOder OrderDate |
-- 1. Find the firstname of customers who order all products
-- where Category = 'B' and OrderDate = '15 March 2024'
SELECT DISTINCT c.FirstName
FROM Customer c
JOIN Orders o ON c.CustomerID = o.CustomerID
JOIN Product p ON o.ProductID = p.ProductID
WHERE p.Category = 'B'
AND o.OrderDate = '2024-03-15'
AND NOT EXISTS (
SELECT *
FROM Product p2
WHERE p2.Category = 'B'
AND p2.ProductID NOT IN (
SELECT o2.ProductID
FROM Orders o2
WHERE o2.CustomerID = c.CustomerID
AND o2.OrderDate = '2024-03-15'
)
);
-- 2. Find the TotalOrder as Monetary Amount
-- which is ordered between 15 March 2024 and 29 March 2024
SELECT SUM(op.Quantity * p.Price) AS TotalOrder
FROM Orders o
JOIN OrderProduct op ON o.OrderID = op.OrderID
JOIN Product p ON op.ProductID = p.ProductID
WHERE o.OrderDate BETWEEN '2024-03-15' AND '2024-03-29';
