Skip to content
Past paper

Bangladesh Bank; Assistant Programmer Written Test: 2016প্রশ্ন ও সমাধান

Set by
Bangladesh Bank
Post
Assistant Programmer
Exam date
2016
Questions
8 (0 MCQ, 8 written)
Exam guide
Bank IT jobs · ব্যাংকের আইটি চাকরি
  • Database · ডেটাবেজ 2
  • Programming · প্রোগ্রামিং 2
  • Algorithms · অ্যালগরিদম 1
  • Digital Logic · ডিজিটাল লজিক 1
  • Networking · নেটওয়ার্কিং 1
  • Web Technology · ওয়েব টেকনোলজি 1
Written question 1Digital Logic

What is tautology? A statement like [(A→B) ^A] →A was given and said to prove it is a tautology by using truth table.

Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন

Written question 2Programming

What is polymorphism? What is the difference between method overriding and method overloading?

Model answer

Polymorphism ("many forms") is the OOP principle that lets the same interface — a method name or operator — behave differently depending on the object or arguments involved. It comes in two flavours:

  • Compile-time (static) polymorphism — method overloading: multiple methods share a name in the same class but differ in parameter list; the compiler resolves which one to call.
  • Run-time (dynamic) polymorphism — method overriding: a subclass supplies its own implementation of a method already defined in its superclass; the JVM/runtime resolves which version to call based on the actual object type.
Aspect Overloading Overriding
Classes Same class Parent and child
Signature Differs (params) Identical
Resolved Compile-time Run-time
Also called Static/early binding Dynamic/late binding
class Shape {
    double area() { return 0; }
}
class Circle extends Shape {
    double r;
    Circle(double r) { this.r = r; }
    @Override
    double area() { return Math.PI * r * r; }   // overriding
}
class Calc {
    int sum(int a, int b) { return a + b; }
    double sum(double a, double b) { return a + b; } // overloading
}

Exam takeaway: polymorphism = one interface, many implementations; overloading picks the version at compile time by signature, overriding picks it at run time by actual object type.

Written question 3Networking

What is main difference between Domain and Workgroup?

Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন

Written question 4Programming

Write a structured program to display Fibonacci series up to 100 Numbers.

Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন

Written question 5Database

Define 'integrity rules' of database systems. Write a SQL query to get the second highest salary from Employee table.

Model answer

Integrity rules are constraints a relational database enforces so that stored data remains accurate and consistent:

  1. Entity integrity: every table must have a primary key, and that key's value can never be NULL — it uniquely identifies each row.
  2. Referential integrity: a foreign key value must either match an existing primary key value in the referenced table or be NULL — no row may reference a non-existent parent.
  3. Domain integrity: every column's value must respect its declared data type, format, and constraints (e.g. CHECK, NOT NULL, valid range).

SQL — second highest salary from Employee:

-- Method 1: subquery
SELECT MAX(salary) AS second_highest
FROM   Employee
WHERE  salary < (SELECT MAX(salary) FROM Employee);

-- Method 2: window function (handles ties cleanly)
SELECT salary AS second_highest
FROM (
    SELECT salary, DENSE_RANK() OVER (ORDER BY salary DESC) AS rnk
    FROM   Employee
) ranked
WHERE rnk = 2
LIMIT 1;

How it works: Method 1 excludes the overall maximum, then re-applies MAX() to what remains — leaving exactly the second-highest value. Method 2 ranks all salaries in descending order and picks the row ranked 2, correctly handling duplicate top salaries.

Exam takeaway: entity, referential, and domain integrity are the three classic integrity rules; for "Nth highest" queries, DENSE_RANK() is the most robust general solution.

Written question 6Database

What is cardinality and modality?

Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন

Written question 7Web Technology

What are the minimum HTML Tags is used web pages? How can your comments at web pages so that browser not read this?

Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন

Written question 8Algorithms

Find time and space complexity like below pseudo code.

Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন

Question text is from the public recruitment exam; answers and explanations are written by ARBS Academy. All past papers · Bank IT jobs guide