ICB Securities Trading Company Assistant Programmer Exam 11 July 2026 — Question Solution | আইসিবি সিকিউরিটিজ ট্রেডিং কোম্পানি সহকারী প্রোগ্রামার নিয়োগ পরীক্ষা ২০২৬ — প্রশ্ন সমাধান
Page updated
ARBS Academy · itjobs.arbsacademy.com
About this exam paper · প্রশ্নপত্র পরিচিতি
The ICB Securities Trading Company Assistant Programmer exam was held on 11 July 2026, conducted by DU. The paper had 3 written questions. The subjects asked most were Programming (2) and Database (1). This page lists every question, with 2 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
- ICB Securities Trading Company
- Post
- Assistant Programmer
- Exam date
- 11 July 2026
- Conducted by
- DU
- Questions
- 3 (0 MCQ, 3 written)
- Exam guide
- Government IT officer posts · সরকারি প্রতিষ্ঠানের আইটি পদ
A file student.txt contains records in the format: StudentID Name Marks1 Marks2 Marks3 Marks4
Write a program that:
(a)(3 Marks) Calculates total and average marks.
(b) (3 Marks) Assigns grades (A+, A, B,C,F). Where,Marks | ≥80 | ≥70 | ≥60 | ≥50 | <50 |
Grade | A+ | A | B | C | <F |
(c) (3 Marks) Displays the top scored three students.
(d) (3 Marks) Displays the subject having the highest average mark.
Model answer
Approach (C). Read the file line by line into an array of structures, compute each student's total and average while reading, grade the student from the average (each subject is out of 100), pick the three highest totals, and finally average each of the four mark columns.
| Part | Technique |
|---|---|
| (a) total, average | sum of 4 marks; average = total ⁄ 4 in float |
| (b) grade | if–else if ladder on the average: ≥80 A+, ≥70 A, ≥60 B, ≥50 C, below 50 F |
| (c) top three | 3 passes of selection sort (largest total moves to the front) |
| (d) best subject | column-wise average of Marks1…Marks4, keep the index of the maximum |
flowchart TD
A["Open student.txt (stop if NULL)"] --> B["fscanf ID, Name, 4 marks"]
B --> C["total = sum, avg = total / 4"]
C --> D["grade from avg"]
D --> B
B -->|"EOF"| E["Print table (a)(b)"]
E --> F["3 selection passes: top three (c)"]
F --> G["Column averages, pick maximum (d)"]
Program
#include <stdio.h>
#include <string.h>
#define MAX 1000
#define SUB 4
typedef struct {
char id[20];
char name[50];
float marks[SUB];
float total;
float avg;
char grade[3];
} Student;
/* (b) grade from the average mark */
void assignGrade(Student *s)
{
if (s->avg >= 80) strcpy(s->grade, "A+");
else if (s->avg >= 70) strcpy(s->grade, "A");
else if (s->avg >= 60) strcpy(s->grade, "B");
else if (s->avg >= 50) strcpy(s->grade, "C");
else strcpy(s->grade, "F");
}
int main(void)
{
Student st[MAX];
int n = 0, i, j, k;
FILE *fp = fopen("student.txt", "r");
if (fp == NULL) {
printf("Cannot open student.txt\n");
return 1;
}
/* read: StudentID Name Marks1 Marks2 Marks3 Marks4 */
while (n < MAX && fscanf(fp, "%19s %49s %f %f %f %f", st[n].id, st[n].name,
&st[n].marks[0], &st[n].marks[1],
&st[n].marks[2], &st[n].marks[3]) == 6) {
/* (a) total and average */
st[n].total = 0;
for (j = 0; j < SUB; j++)
st[n].total += st[n].marks[j];
st[n].avg = st[n].total / SUB;
assignGrade(&st[n]); /* (b) */
n++;
}
fclose(fp);
if (n == 0) {
printf("No records found\n");
return 0;
}
/* (a) + (b) report */
printf("%-6s %-8s %6s %7s %5s\n", "ID", "Name", "Total", "Average", "Grade");
for (i = 0; i < n; i++)
printf("%-6s %-8s %6g %7.2f %5s\n", st[i].id, st[i].name,
st[i].total, st[i].avg, st[i].grade);
/* (c) top three by total: partial selection sort, descending */
for (i = 0; i < 3 && i < n; i++) {
int max = i;
for (k = i + 1; k < n; k++)
if (st[k].total > st[max].total)
max = k;
if (max != i) {
Student tmp = st[i];
st[i] = st[max];
st[max] = tmp;
}
}
printf("\nTop three students:\n");
for (i = 0; i < 3 && i < n; i++)
printf("%d. %s %s Total = %g (Grade %s)\n", i + 1,
st[i].id, st[i].name, st[i].total, st[i].grade);
/* (d) subject with the highest average mark */
float subAvg[SUB] = {0};
int best = 0;
for (j = 0; j < SUB; j++) {
for (i = 0; i < n; i++)
subAvg[j] += st[i].marks[j];
subAvg[j] /= n;
if (subAvg[j] > subAvg[best])
best = j;
}
printf("\nSubject averages:");
for (j = 0; j < SUB; j++)
printf(" Marks%d = %.2f", j + 1, subAvg[j]);
printf("\nHighest average: Marks%d (%.2f)\n", best + 1, subAvg[best]);
return 0;
}
Sample student.txt
101 Rahim 85 78 92 88
102 Karim 65 72 58 70
103 Nusrat 90 88 95 91
104 Tanvir 45 52 40 48
105 Sadia 75 80 68 77
106 Arif 55 60 49 62
Output (real run)
ID Name Total Average Grade
101 Rahim 343 85.75 A+
102 Karim 265 66.25 B
103 Nusrat 364 91.00 A+
104 Tanvir 185 46.25 F
105 Sadia 300 75.00 A
106 Arif 226 56.50 C
Top three students:
1. 103 Nusrat Total = 364 (Grade A+)
2. 101 Rahim Total = 343 (Grade A+)
3. 105 Sadia Total = 300 (Grade A)
Subject averages: Marks1 = 69.17 Marks2 = 71.67 Marks3 = 67.00 Marks4 = 72.67
Highest average: Marks4 (72.67)
Trace of a sample run
- Rahim: 85 + 78 + 92 + 88 = 343, average 343 ⁄ 4 = 85.75 → ≥ 80 → A+. Karim: 265 ⁄ 4 = 66.25 → ≥ 60 → B. Tanvir: 185 ⁄ 4 = 46.25 → below 50 → F.
- Top three: pass 1 finds the largest total 364 (Nusrat) and swaps it to index 0; pass 2 finds 343 (Rahim); pass 3 finds 300 (Sadia). Only 3 passes are needed, not a full sort.
- Subject averages: Marks1 = 415 ⁄ 6 = 69.17, Marks2 = 430 ⁄ 6 = 71.67, Marks3 = 402 ⁄ 6 = 67.00, Marks4 = 436 ⁄ 6 = 72.67 → Marks4 is the subject with the highest average.
Key points
fscanf(...) == 6stops cleanly at end of file or on a malformed line;fopenis checked forNULL.%49sreads a one-word name, as in the record format; if names may contain spaces, keep the file comma-separated and read each line withfgets+sscanf.- Ties keep file order: the strict
>in part (c) and part (d) keeps the earlier student or subject. - Marks are read as
float, so the average is never truncated by integer division. i < 3 && i < nkeeps part (c) safe when the file has fewer than three students.- If grades are wanted per subject, call the same ladder on each mark instead of the average.
Complexity (n students, 4 subjects)
- (a)(b) one pass: O(n). (c) 3 selection passes: O(3n) = O(n), better than a full O(n²) or O(n log n) sort. (d) O(4n) = O(n).
- Overall time O(n); space O(n) for the array.
Exam tip: state the assumption that each mark is out of 100 so the grade table is applied to the average, and always check both fopen and the fscanf return value.
Develop a program using object-oriented programming principles.
Requirements
(a) (4 Marks) Create a base class named Employee with the private/protected data members Employee ID, Employee Name, and Basic Salary. In addition, this class should include a constructor to initialize the data members and a method to display employee information.
(b) (5 Marks) Create a derived class named PermanentEmployee that inherits from Employee. It should have methods to calculate a 20% allowance based on the basic salary, to calculate the total salary, and to display the total salary along with the employee information.
(c) (4 Marks) In the main() method:
(i) Create objects for three PermanentEmployee.
(ii) Display the details and total salary of each employee.
(iii) Display the employee with the highest total salary.
Model answer
Language: C++ (C has no classes; the same design works in Java with extends and super(...)).
OOP principles used
- Encapsulation: ID, name and basic salary are
protected, somain()cannot change them directly; they are set only through the constructor. - Inheritance:
PermanentEmployeeis anEmployee(public inheritance) and reuses its data anddisplay(). - Constructor chaining: the derived constructor passes the values to
Employee(id, name, basic)in its initializer list. - Polymorphism:
display()isvirtualand is overridden to add the allowance and total salary.
classDiagram
class Employee {
#int employeeId
#string employeeName
#double basicSalary
+Employee(int, string, double)
+display() void
}
class PermanentEmployee {
+PermanentEmployee(int, string, double)
+calculateAllowance() double
+calculateTotalSalary() double
+display() void
}
Employee <|-- PermanentEmployee
Program
#include <iostream>
#include <iomanip>
#include <string>
using namespace std;
// (a) Base class
class Employee {
protected: // visible to derived classes, hidden from main()
int employeeId;
string employeeName;
double basicSalary;
public:
Employee(int id, const string &name, double basic)
: employeeId(id), employeeName(name), basicSalary(basic) {}
virtual ~Employee() {}
virtual void display() const {
cout << "ID: " << employeeId
<< ", Name: " << employeeName
<< ", Basic: " << basicSalary << endl;
}
};
// (b) Derived class
class PermanentEmployee : public Employee {
public:
PermanentEmployee(int id, const string &name, double basic)
: Employee(id, name, basic) {} // base-class constructor
double calculateAllowance() const {
return basicSalary * 0.20; // 20% of basic
}
double calculateTotalSalary() const {
return basicSalary + calculateAllowance();
}
void display() const override { // employee info + total salary
Employee::display();
cout << " Allowance (20%): " << calculateAllowance()
<< ", Total Salary: " << calculateTotalSalary() << endl;
}
};
// (c) main()
int main() {
cout << fixed << setprecision(2);
// (i) three PermanentEmployee objects
PermanentEmployee emp[3] = {
PermanentEmployee(101, "Rahim", 45000),
PermanentEmployee(102, "Karim", 52000),
PermanentEmployee(103, "Nusrat", 48500)
};
// (ii) details and total salary of each employee
for (int i = 0; i < 3; i++)
emp[i].display();
// (iii) employee with the highest total salary
int best = 0;
for (int i = 1; i < 3; i++)
if (emp[i].calculateTotalSalary() > emp[best].calculateTotalSalary())
best = i;
cout << "\nHighest total salary:" << endl;
emp[best].display();
return 0;
}
Output (real run)
ID: 101, Name: Rahim, Basic: 45000.00
Allowance (20%): 9000.00, Total Salary: 54000.00
ID: 102, Name: Karim, Basic: 52000.00
Allowance (20%): 10400.00, Total Salary: 62400.00
ID: 103, Name: Nusrat, Basic: 48500.00
Allowance (20%): 9700.00, Total Salary: 58200.00
Highest total salary:
ID: 102, Name: Karim, Basic: 52000.00
Allowance (20%): 10400.00, Total Salary: 62400.00
Trace
| Employee | Basic | Allowance = 0.20 × Basic | Total = Basic + Allowance |
|---|---|---|---|
| 101 Rahim | 45000 | 9000 | 54000 |
| 102 Karim | 52000 | 10400 | 62400 |
| 103 Nusrat | 48500 | 9700 | 58200 |
The search loop starts with best = 0 (54000), compares 62400 > 54000 → best = 1, then 58200 > 62400 is false, so Karim (62400) is printed as the highest total salary.
Mapping to the marks
- (a)
Employee: protected members, constructor with initializer list,display(). - (b)
PermanentEmployee:calculateAllowance(),calculateTotalSalary(), overriddendisplay()that callsEmployee::display()and then prints the total. - (c)
main(): an array of three objects, a loop that displays each, and a max-search oncalculateTotalSalary().
Why protected, not private: a derived class can read protected members directly. With private members, calculateAllowance() could not use basicSalary, and the base class would need a public getter such as getBasicSalary().
Complexity: each method is O(1); displaying and finding the highest of k employees is O(k) time (here k = 3) and O(k) space.
Exam tip: call the base constructor in the derived initializer list, and make display() virtual so a base pointer or reference still prints the total salary.
(15 Marks) A bank introduces a Digital Gold Banking System that allows customers to maintain both conventional bank accounts and digital gold investments. A customer may open one or more accounts, but each account belongs to only one customer and is maintained by a specifie branch. Customers may deposit, withdraw, or transfer money between accounts. Every transaction is processed by an employee and is assigned a iique reference number with its date and time. Customers can also buy or sell digital gold using money from one of their accounts. Since the market price of gold changes throughout the day, the bank records every price update with its effective timestamp. When a gold transaction occurs, the transaction must permanently store the price that was applicable at that moment, even if the market price changes later. A customer cannot sell more gold than the amount currently owned.
Now, design and implement the database with necessary tables with relevant constraints.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Explanations © ARBS Academy
Questions about this paper · সাধারণ প্রশ্ন
- How many questions were in the ICB Securities Trading Company Assistant Programmer exam (2026)?
- 3 written questions.
- Which subjects were asked most in the ICB Securities Trading Company Assistant Programmer exam (2026)?
- Programming (2) and Database (1), out of 3 questions.
- When was the ICB Securities Trading Company Assistant Programmer exam held?
- On 11 July 2026, conducted by DU.
- Where can I find the ICB Securities Trading Company Assistant Programmer exam (2026) question solution?
- On this page: 2 of the 3 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