Loading...
Sonali & Janata Bank

Post: Officer (IT), (Job id:10152)
Exam Date: 14.10.2023, Exam Take: BIBM
9. Analize the following code:

SELECT d.department_name, AVG(e.salary) AS average_salary
FROM employees e
JOIN department d ON e.department_id = d.department_id
WHERE e.salary > (SELECT AVG(salary) FROM employees)
GROUP BY d.department_name
HAVING COUNT(*) > 2
ORDER BY average_salary DESC;

SELECT d.department_name, AVG(e.salary) AS average_salary

This clause selects the department name and calculates the average salary of employees in each department.

FROM employees e

This clause specifies the employees table as the main data source and uses e as an alias.

JOIN department d ON e.department_id = d.department_id

This join links employees with their departments using the common department_id.

WHERE e.salary > (SELECT AVG(salary) FROM employees)

This condition filters employees whose salary is higher than the overall average salary of all employees.

GROUP BY d.department_name

This clause groups records by department name to calculate aggregate values.

HAVING COUNT(*) > 2

This condition ensures that only departments with more than two employees are included.

ORDER BY average_salary DESC

This clause sorts the result in descending order based on average salary.

SELECT d.department_name, AVG(e.salary) AS average_salary

এই clause department-এর নাম দেখায় এবং প্রতিটি department-এর employee-দের average salary হিসাব করে।

FROM employees e

এই clause employees table-কে data source হিসেবে ব্যবহার করে এবং e alias ব্যবহার করে।

JOIN department d ON e.department_id = d.department_id

এই JOIN clause department_id ব্যবহার করে employee-দের তাদের department-এর সাথে যুক্ত করে।

WHERE e.salary > (SELECT AVG(salary) FROM employees)

এই condition শুধুমাত্র সেই employee-দের নির্বাচন করে যাদের salary সব employee-এর overall average salary-এর চেয়ে বেশি।

GROUP BY d.department_name

এই clause department অনুযায়ী data group করে aggregate calculation করতে সাহায্য করে।

HAVING COUNT(*) > 2

এই clause নিশ্চিত করে যে শুধুমাত্র ২ জনের বেশি employee থাকা department গুলো result-এ আসবে।

ORDER BY average_salary DESC

এই clause average salary অনুযায়ী descending order-এ result সাজায়।

10. Find the output of following program:


int F(n) {
if n == 0
return 0;
if n == 1
return 1;
return F(n-2)+F(n-1);
}
int main () {
result F(5);
}

The output of the program will be 5.

=====================

Code Analysis

  1. Function F(n):
    • The function calculates the Fibonacci number for a given n using recursion.
    • Base Cases:
      • If n == 0, it returns 0.
      • If n == 1, it returns 1.
    • Recursive Case:
      • For other values of n, it returns F(n-2) + F(n-1).
  2. Main Function:
    • The main function calls F(5) and stores the result (though it should be assigned to a variable like result).

Calculation of F(5)

The Fibonacci sequence calculated by the function is:

F(5) = F(4) + F(3)
F(4) = F(3) + F(2)
F(3) = F(2) + F(1)
F(2) = F(1) + F(0)

Breaking it down:

F(2) = 1 (F(1) + F(0) = 1 + 0)

F(3) = 2 (F(2) + F(1) = 1 + 1)

F(4) = 3 (F(3) + F(2) = 2 + 1)

F(5) = 5 (F(4) + F(3) = 3 + 2)

11. Write a program for following sequence and analyze complexity of the program
1, 2, 2, 3, 3, 3, ……………………..100 (100times )

#include <iostream>
using namespace std;

int main() {
    // Loop from 1 to 100
    for (int n = 1; n <= 100; n++) {
        // Inner loop to repeat 'n' exactly 'n' times
        for (int i = 0; i < n; i++) {
            cout << n << " ";
        }
    }
    cout << endl; // Print a newline at the end of the sequence
    return 0;
}


🔗 Run Online: Printing Sequence

12. Which SDLC do you prefer between Agile and waterfall model explain with example.

Preferred SDLC Model: Agile vs Waterfall

Between Agile and Waterfall SDLC models, Agile is generally preferred in modern software development because it is flexible, customer-focused, and adapts easily to changes.

Why Agile is Preferred over Waterfall

  • Flexibility: Agile allows changes in requirements even at later stages, while Waterfall does not.
  • Customer Involvement: Customers are involved throughout the development process in Agile.
  • Early Delivery: Agile delivers working software in small iterations.
  • Risk Reduction: Problems are identified early through continuous testing and feedback.

Example of Agile Model

Developing a mobile banking app is suitable for Agile because features like UI design, security, and payment options may change based on user feedback.

When Waterfall is Suitable

Waterfall is suitable when requirements are fixed and well-defined, such as developing payroll software for a government organization.

Preferred SDLC Model: Agile বনাম Waterfall

Agile ও Waterfall SDLC model-এর মধ্যে আধুনিক software development-এ সাধারণত Agile বেশি prefer করা হয়, কারণ এটি flexible এবং change-friendly।

Agile কেন Waterfall-এর চেয়ে ভালো

  • Flexibility: Agile-এ development চলাকালীন requirement পরিবর্তন করা যায়, Waterfall-এ যায় না।
  • Customer Involvement: Agile-এ customer পুরো development process-এ যুক্ত থাকে।
  • Early Delivery: Agile ছোট ছোট iteration-এ working software দেয়।
  • Risk Reduction: Continuous testing ও feedback-এর মাধ্যমে সমস্যা আগে ধরা পড়ে।

Agile Model-এর উদাহরণ

Mobile banking app development Agile-এর জন্য উপযুক্ত, কারণ user feedback অনুযায়ী feature ও design পরিবর্তন হতে পারে।

Waterfall কখন উপযুক্ত

Waterfall model উপযুক্ত যখন requirement আগে থেকেই সম্পূর্ণ নির্ধারিত থাকে, যেমন government payroll software development।

13. Difference between Guided and Unguided media. Difference between STP and UTP. Why using benefit UTP instead of STP?.

1. Difference between Guided and Unguided Transmission Media

AspectGuided MediaUnguided Media
DefinitionData is transmitted through physical cablesData is transmitted through air without cables
Transmission PathUses wired pathUses wireless path
InterferenceLow interferenceHigh interference
SecurityMore secureLess secure
ExamplesTwisted pair, Co-axial cable, Fiber opticsRadio waves, Microwave, Satellite

2. Difference between STP and UTP Cable

AspectSTP (Shielded Twisted Pair)UTP (Unshielded Twisted Pair)
ShieldingHas metallic shieldingNo shielding
Interference ProtectionHigh protection from EMILess protection from EMI
CostMore expensiveCheaper
InstallationDifficultEasy
UsageIndustrial environmentLAN and office networks

3. Why UTP is Preferred over STP

  • Low Cost: UTP cables are cheaper than STP cables.
  • Easy Installation: UTP cables are lighter and flexible.
  • Widely Available: Used in most LAN and Ethernet networks.
  • Sufficient Performance: Provides good performance in normal office environments.

১. Guided ও Unguided Transmission Media-এর পার্থক্য

বিষয়Guided MediaUnguided Media
সংজ্ঞাPhysical cable ব্যবহার করে data পাঠানো হয়Air বা space দিয়ে data পাঠানো হয়
Transmission PathWired মাধ্যমWireless মাধ্যম
Interferenceকমবেশি
Securityবেশি নিরাপদকম নিরাপদ
উদাহরণTwisted pair, Co-axial cable, Fiber opticsRadio wave, Microwave, Satellite

২. STP ও UTP Cable-এর পার্থক্য

বিষয়STP (Shielded Twisted Pair)UTP (Unshielded Twisted Pair)
ShieldingMetallic shielding থাকেShielding থাকে না
Interference ProtectionEMI থেকে বেশি সুরক্ষাEMI থেকে কম সুরক্ষা
খরচবেশিকম
Installationকঠিনসহজ
ব্যবহারIndustrial environmentLAN ও office network

৩. STP-এর তুলনায় UTP ব্যবহার করার সুবিধা

  • কম খরচ: UTP cable তুলনামূলকভাবে সস্তা।
  • সহজ Installation: UTP হালকা ও flexible হওয়ায় সহজে বসানো যায়।
  • ব্যাপক ব্যবহার: অধিকাংশ Ethernet ও LAN network-এ ব্যবহৃত হয়।
  • যথেষ্ট Performance: সাধারণ office environment-এর জন্য যথেষ্ট ভালো performance দেয়।
14. Difference between TCP and UDP. Distinguish between Cat5 and Cat6. Difference among exFAT, FAT32 and NTFS.

tcp_vs_udp

tcp_vs_udp

You must subscribe & Login to view more.

Don’t have an account? Register

Or your subscription is under review by admin. Please message on WhatsApp / Telegram.

Leave a Comment

Latest Post
Field Based Job Question & Solution
Bank IT Job Solution

MCQ + Written from Bangladesh Bank, Sonali, Combined Bank IT recruitment.

BPSC IT Job Solution

BPSC Computer/IT cadre & non-cadre post Question papers with full solutions.

Gas Field IT Job Solution

Gas field like TGTDCL, BGDCL, JGTDSL, KGDCL, SGCL, RPGCL, GTCL etc. question solution

Power Sector IT Job Solution

Power sector such as NESCO, DESCO, DPDC, WZPDCL, BPDB, PGCB, BREB etc

Other IT Job Solution

Other Govt. Semi govt. organization like BCC, BTCL, CAAB, NSI etc.

NTRCA IT Job Solution (upcoming)

NTRCA ICT-related posts such as Assistant Teacher, Demonstrator, Lecturer.

IT MCQ Job Solution

Collected MCQ Job solution of BANK, BPSC, POWER SECTOR, GAS Field and Others.

Topic Based Q&S
WhatsApp Telegram Messenger