Investment Corporation Bangladesh Assistant Programmer Exam 2017 — Question Solution | ইনভেস্টমেন্ট কর্পোরেশন অব বাংলাদেশ (আইসিবি) সহকারী প্রোগ্রামার নিয়োগ পরীক্ষা ২০১৭ — প্রশ্ন সমাধান
- Investment Corporation Bangladesh
- Assistant Programmer
- 2017
- 10 questions · 0 MCQ, 10 written
Page updated
ARBS Academy · itjobs.arbsacademy.com
About this exam paper · প্রশ্নপত্র পরিচিতি
The Investment Corporation Bangladesh Assistant Programmer exam was held in 2017. The paper had 10 written questions. The subjects asked most were Web Technology (4), Programming (3) and Data Structures (1). This page lists every question, with 3 answered and explained; the rest of the answers open with a free ARBS Academy account, where the paper can also be practised as a timed test.
ইনভেস্টমেন্ট কর্পোরেশন অব বাংলাদেশ (আইসিবি) সহকারী প্রোগ্রামার নিয়োগ পরীক্ষার (২০১৭) এই প্রশ্নপত্রে ১০টি প্রশ্ন ছিল, বেশিরভাগ ওয়েব টেকনোলজি ও প্রোগ্রামিং থেকে। এখানে ৩টি প্রশ্নের ব্যাখ্যাসহ উত্তর দেওয়া আছে; বাকিগুলো ফ্রি অ্যাকাউন্টে খোলে।
- Organisation
- Investment Corporation Bangladesh
- Post
- Assistant Programmer
- Exam date
- 2017
- Questions
- 10 (0 MCQ, 10 written)
- Exam guide
- Government IT officer posts · সরকারি প্রতিষ্ঠানের আইটি পদ
What is CLR in .NET Framework? List the components of .NET Framework.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
What are the difference among Candidate key, Primary key and Foreign key?
Model answer
In short: a candidate key is any minimal set of attributes that can uniquely identify a row; the primary key is the one candidate key chosen as the table's main identifier; a foreign key is an attribute in one table whose values must match a key value in another (or the same) table, linking the two tables.
Example (a clinic):Doctor(doctor_id, licence_no, doctor_name, phone) — business rules: doctor_id and licence_no are each unique for every doctor; names and phones can repeat or be missing.Appointment(appt_no, doctor_id, patient_name, appt_date) — each appointment is with at most one doctor; doctor_id stays NULL until a doctor is assigned.
- Candidate keys of Doctor: {doctor_id} and {licence_no} (each is unique and minimal).
- Primary key: doctor_id (chosen); licence_no becomes the alternate key.
- Foreign key: Appointment.doctor_id → Doctor.doctor_id.
CREATE TABLE doctor (
doctor_id INT NOT NULL PRIMARY KEY,
licence_no VARCHAR(10) NOT NULL UNIQUE, -- other candidate key
doctor_name VARCHAR(40) NOT NULL,
phone VARCHAR(15)
);
CREATE TABLE appointment (
appt_no INT NOT NULL PRIMARY KEY,
doctor_id INT REFERENCES doctor (doctor_id), -- foreign key
patient_name VARCHAR(40) NOT NULL,
appt_date DATE NOT NULL
);
| doctor_id (PK) | licence_no (UNIQUE) | doctor_name |
|---|---|---|
| 11 | A-40121 | Dr. Farhana |
| 12 | A-52310 | Dr. Mizan |
| 13 | A-61007 | Dr. Tareq |
| appt_no (PK) | doctor_id (FK) | patient_name |
|---|---|---|
| 501 | 11 | Selina |
| 502 | 11 | Jamal |
| 503 | 12 | Ruma |
| 504 | NULL | Hasan |
With foreign keys enforced: a doctor row with an existing licence_no or doctor_id is rejected; an appointment with doctor_id = 99 is rejected (no such doctor); deleting doctor 11 is rejected because appointments refer to that row (the default action is NO ACTION/RESTRICT; ON DELETE CASCADE or SET NULL must be declared to change it). Rows 501 and 502 show that a foreign key value may repeat, and row 504 that it may be NULL. (SQLite enforces foreign keys only after PRAGMA foreign_keys = ON.)
erDiagram
DOCTOR |o--o{ APPOINTMENT : attends
DOCTOR {
int doctor_id PK
string licence_no UK
string doctor_name
string phone
}
APPOINTMENT {
int appt_no PK
int doctor_id FK
string patient_name
date appt_date
}
| Basis | Candidate key | Primary key | Foreign key |
|---|---|---|---|
| Purpose | Can identify each row | Is the chosen identifier | Links a row to a row of another table |
| Unique? | Yes | Yes | No, values may repeat |
| Minimal? | Yes | Yes | Not required |
| NULL? | Should not be NULL (declare UNIQUE NOT NULL) | Never | Allowed unless declared NOT NULL |
| Number per table | One or more | At most one | Zero or more |
| Declared with | UNIQUE (alternate keys) | PRIMARY KEY | FOREIGN KEY … REFERENCES |
| Refers to | Its own table | Its own table | A primary key or UNIQUE key of the parent table (can be the same table) |
Exam tip: primary key = one candidate key that was chosen; foreign key = the "pointer" that enforces referential integrity, may repeat and may be NULL.
Difference between black box and white box testing.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
What is canvas HTML? What is difference between HTML canvas and SVG?
Model answer
HTML canvas is the HTML5 <canvas> element: a rectangular, resolution-dependent bitmap (a grid of pixels) placed on the page. The element draws nothing by itself; JavaScript obtains a drawing context with getContext("2d") (or "webgl"/"webgl2" for 3-D) and paints lines, shapes, text and images on it at run time. If no width/height is given, the canvas is 300 × 150 pixels. Content written between <canvas> and </canvas> is fallback content, shown when the canvas cannot be used.
SVG (Scalable Vector Graphics) is an XML-based language for vector graphics: every shape is written as a tag (<rect>, <circle>, <text>) and becomes part of the page's DOM.
The same small bar chart drawn both ways (example values: 40, 70 and 55)
<!-- Canvas: pixels painted by JavaScript -->
<canvas id="bars" width="220" height="120">Bar chart: 40, 70 and 55.</canvas>
<script>
const ctx = document.getElementById("bars").getContext("2d");
const values = [40, 70, 55];
ctx.fillStyle = "teal";
values.forEach(function (v, i) {
ctx.fillRect(20 + i * 70, 110 - v, 40, v); // x, y, width, height
});
</script>
<!-- SVG: each bar is its own element -->
<svg width="220" height="120" role="img" aria-label="Bar chart: 40, 70 and 55">
<rect x="20" y="70" width="40" height="40" fill="teal"/>
<rect x="90" y="40" width="40" height="70" fill="teal"/>
<rect x="160" y="55" width="40" height="55" fill="teal"/>
</svg>
Both show three bars standing on the line y = 110. To make the middle bar orange later, the SVG version needs one change (fill="orange" on the second <rect>, or a CSS rule); the canvas version must repaint that area or redraw the whole chart, because the canvas keeps only coloured pixels, not "bar" objects.
Difference between HTML canvas and SVG
| Basis | HTML canvas | SVG |
|---|---|---|
| Graphics type | Raster (pixel-based) | Vector (shape-based) |
| How it is drawn | Imperatively by JavaScript calls (fillRect, arc, drawImage) |
Declaratively by markup tags (<rect>, <circle>, <path>) |
| After drawing | Only pixels remain; no object for each shape | Each shape stays a DOM element that can be selected and changed |
| Zoom / resize | Becomes blurred or pixelated when enlarged | Stays sharp at any size; good for printing |
| Event handling | One element; clicks on a shape need manual hit-testing with coordinates | Each shape can have its own click/mouseover listener |
| Styling | Shapes cannot be styled by CSS (only the <canvas> box) |
Shapes can be styled by CSS and changed by JavaScript |
| Performance | Fast for thousands of objects and frequent redraws, cost depends on pixel area | Slows down as the number of elements grows; fine for fewer objects on large areas |
| Accessibility / search | Drawn text is not real text; needs fallback content or ARIA | Text stays real, selectable and readable by screen readers |
| Saving output | Export as PNG/JPEG with toDataURL() / toBlob() |
Saved as a text .svg file |
| Typical use | Games, photo filters, video effects, real-time charts | Logos, icons, maps, diagrams, interactive charts |
Exam tip: canvas = pixels drawn by JavaScript (fast, many objects, not scalable); SVG = XML vector shapes in the DOM (scalable, styleable, each shape clickable).
How to change html attribute through html DOM?
Model answer
The HTML DOM (Document Object Model) represents an HTML page as a tree of objects; JavaScript can use DOM methods to read or change any element's attributes at runtime.
Method: element.setAttribute(name, value) sets (or updates) an attribute; element.getAttribute(name) reads it; element.removeAttribute(name) deletes it.
<!DOCTYPE html>
<html>
<head>
<style>
.highlight { color: red; font-weight: bold; }
</style>
</head>
<body>
<h1 id="title">Hello World</h1>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
const heading = document.getElementById("title");
heading.setAttribute("class", "highlight"); // change the class attribute
}
</script>
</body>
</html>
How it works: document.getElementById("title") locates the DOM node; .setAttribute("class", "highlight") then changes its class attribute at runtime, which immediately applies the CSS rule bound to .highlight — the page updates without a reload.
Other common attribute changes: img.setAttribute("src", "new.jpg"), link.setAttribute("href", "page2.html"), or directly via the property shortcut element.className = "highlight".
Exam takeaway: setAttribute()/getAttribute() are the general DOM API for any attribute; many common attributes (class, id, value, src) also have direct JavaScript property shortcuts.
Find the mistake in the following program and write it correct form.
unsigned int i;
for(i=100; i<=0; --i)
printf("%d",i);
return 0;
What is Binary Search Tree? Explain the complexity of BST?
What are the uses of <header>, <article>, <section> and <footer> in html?
What is closure in JavaScript? Explain with an example?
Difference among $.ajax(), $.load(), $.get().
Sign up free to see the model answers to written questions 6–10 · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Explanations © ARBS Academy
Keep going with a free account · ফ্রি অ্যাকাউন্টে যা যা করতে পারবেন
7 more answers from this paper open with a free account.
এই প্রশ্নপত্রের আরও ৭টি উত্তর, ধাপে ধাপে ব্যাখ্যাসহ, ফ্রি অ্যাকাউন্টে খুলবে।
Free account · 1 day of Premium free
Paper analysis · প্রশ্নপত্র বিশ্লেষণ
Its questions come from 6 syllabus chapters; the biggest is HTML & CSS, in Web Technology, with 2 questions. HTML & CSS is asked in 33 other papers too (2016–2026).
Its biggest topics · প্রধান টপিক
Questions in this paper, and how many of our other papers ask the topic
- HTML & CSS Web Technology · 33 other papers, 2016–20262
- Control Flow & Loops Programming · 76 other papers, 2015–20261
- Functions & Recursion Programming · 60 other papers, 2016–20261
- Trees Data Structures · 47 other papers, 2015–20261
- Keys & Relational Model Database · 42 other papers, 2016–20251
- APIs & Architecture Web Technology · 18 other papers, 2016–20261
From our own past papers: each question filed under one syllabus chapter. Practice and held questions are not counted.
Questions about this paper · সাধারণ প্রশ্ন
- How many questions were in the Investment Corporation Bangladesh Assistant Programmer exam (2017)?
- 10 written questions.
- Which subjects were asked most in the Investment Corporation Bangladesh Assistant Programmer exam (2017)?
- Web Technology (4), Programming (3) and Data Structures (1), out of 10 questions.
- When was the Investment Corporation Bangladesh Assistant Programmer exam held?
- In 2017. The exact day isn't in our records.
- Where can I find the Investment Corporation Bangladesh Assistant Programmer exam (2017) question solution?
- On this page: 3 of the 10 questions are shown with worked answers. The rest of the answers open with a free ARBS Academy account, where the paper can also be practised as a timed test.
Question text is from the public recruitment exam; answers and explanations are written by ARBS Academy. All past papers