Cadet College (Combined) — Lecturer ICT — Exam: 11.05.2025প্রশ্ন ও সমাধান
- Set by
- Cadet College
- Post
- Lecturer
- Exam date
- 11 May 2025
- Questions
- 10 (0 MCQ, 10 written)
- Exam guide
- ICT teaching posts (NTRCA) · আইসিটি শিক্ষক পদ (এনটিআরসিএ)
- Programming · প্রোগ্রামিং 3
- Digital Logic · ডিজিটাল লজিক 2
- Operating Systems · অপারেটিং সিস্টেম 2
- Data Structures · ডেটা স্ট্রাকচার 1
- Database · ডেটাবেজ 1
- Networking · নেটওয়ার্কিং 1
(a) An organization wants to divide its LAN IP address 192.168.0.0/24 into 4 subnets according to buildings. The buildings IP address creiteria are given below.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
(a) Write a C++ program named 'class student' that has three attributes: name, roll, and marks. Use the get method to create two objects. Then, find the student with the highest marks and print that student's name.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
(b) Find out the output of this program.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
(a) Design a full adder circuit and draw the diagram.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
(a) Define RDBMS. Explain the different key and primary key, candidate key, super key, and foreign key DBMS.
Model answer
RDBMS (Relational Database Management System) is a database system that stores data in structured tables (relations) made of rows and columns, uses SQL to manipulate data, and enforces relationships and integrity constraints between tables via keys (e.g., MySQL, Oracle, PostgreSQL, SQL Server).
Types of keys:
| Key | Definition | Example (Student table: roll, name, email, dept_id) |
|---|---|---|
| Super key | Any set of one or more attributes that can uniquely identify a row (may include extra, unnecessary attributes) | {roll}, {roll, name}, {email, name} |
| Candidate key | A minimal super key — no attribute can be removed without losing uniqueness | {roll}, {email} |
| Primary key | The candidate key chosen by the designer as the main identifier; cannot be NULL, must be unique | roll (chosen as PK) |
| Foreign key | An attribute in one table referencing the primary key of another table, enforcing referential integrity | dept_id in Student references dept_id (PK) in Department |
erDiagram
STUDENT }o--|| DEPARTMENT : belongs_to
STUDENT {
int roll PK
string name
string email
int dept_id FK
}
DEPARTMENT {
int dept_id PK
string dept_name
}
- Every candidate key is a super key, but not every super key is a candidate key (super keys can contain redundant attributes).
- Every primary key is a candidate key, but only one candidate key per table is chosen as the primary key — the remaining candidate keys are called alternate keys.
Exam takeaway: Super key (any unique combo) is a superset of Candidate key (minimal unique combo) which is a superset of Primary key (the chosen candidate key); Foreign key links tables by referencing another table's primary key.
(a) Define operating system. Why resource allocation graph used for deadlock detection?
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
(a) Difference between a while loop and do-while loop.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Consider the set of 3 processes whose arrival time and burst time are given below-
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
(a) Convert the following number:
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Explain the push and pop operations of the stack.
Model answer
Stack is a LIFO (Last-In-First-Out) linear data structure — the last element inserted is the first one removed. It exposes exactly two core mutating operations: push and pop, tracked via a top pointer/index.
- Push(x): insert element x on top of the stack.
- Check for overflow (stack full, in a fixed-size array implementation).
- Increment
top. - Store x at
stack[top].
- Pop(): remove and return the top element.
- Check for underflow (stack empty —
top == -1). - Read the value at
stack[top]. - Decrement
top.
- Check for underflow (stack empty —
flowchart TD
subgraph Push
P1{Stack full?} -- Yes --> P2([Overflow])
P1 -- No --> P3[top = top+1] --> P4[stack top = x]
end
subgraph Pop
Q1{Stack empty?} -- Yes --> Q2([Underflow])
Q1 -- No --> Q3[x = stack top] --> Q4[top = top-1]
end
#define MAX 100
int stack[MAX], top = -1;
void push(int x) {
if (top == MAX - 1) { printf("Overflow\n"); return; }
stack[++top] = x;
}
int pop() {
if (top == -1) { printf("Underflow\n"); return -1; }
return stack[top--];
}
Both operations run in O(1) time since only the top pointer changes — no shifting of other elements is needed (unlike inserting/deleting at an arbitrary array position).
Real-world uses: function call stack (recursion), undo/redo, expression evaluation (infix→postfix), browser back-button history.
Exam takeaway: push = increment top then insert (check overflow first); pop = read then decrement top (check underflow first); both O(1).
Question text is from the public recruitment exam; answers and explanations are written by ARBS Academy. All past papers · ICT teaching posts (NTRCA) guide