WZPDCL; Assistant Engineer (CSE)- 2019 Exam Taker: KUETপ্রশ্ন ও সমাধান
- Set by
- WZPDCL
- Post
- Assistant Engineer
- Exam date
- 2019
- Questions
- 13 (0 MCQ, 13 written)
- Exam guide
- Government IT officer posts · সরকারি প্রতিষ্ঠানের আইটি পদ
- Networking · নেটওয়ার্কিং 4
- Database · ডেটাবেজ 2
- Digital Logic · ডিজিটাল লজিক 2
- Programming · প্রোগ্রামিং 2
- Algorithms · অ্যালগরিদম 1
- Data Structures · ডেটা স্ট্রাকচার 1
- Mathematics · গণিত 1
What is tautology? Write an example of a tautology.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
What is linear and Non-linear data structure? Write an example of data structure which represents logarithmic complexity?
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
How many bits for IPv6? Write an example IPv6?
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
What is Constructor function? Write an example of Constructor function?
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Difference between Register and Latch.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Main difference between Combinational and Sequential circuits.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Difference between Router and Switch.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Write an algorithm for matrix multiplication.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
What is recursive function? Give an example of recursive function.
Model answer
A recursive function is a function that calls itself, directly or indirectly, to solve a smaller instance of the same problem, until a base case is reached that stops further calls.
Two essential parts of any recursive function:
- Base case: the simplest input, solved directly without further recursion (prevents infinite recursion).
- Recursive case: breaks the problem into a smaller sub-problem and calls itself on that sub-problem.
Example — factorial (C):
int factorial(int n) {
if (n == 0) return 1; // base case
return n * factorial(n - 1); // recursive case
}
Call stack for factorial(4):
graph TD
A["factorial(4) = 4*factorial(3)"] --> B["factorial(3) = 3*factorial(2)"]
B --> C["factorial(2) = 2*factorial(1)"]
C --> D["factorial(1) = 1*factorial(0)"]
D --> E["factorial(0) = 1 (base case)"]
Unwinding: 1 → 1×1=1 → 2×1=2 → 3×2=6 → 4×6=24.
Trade-offs: recursion often gives cleaner, more readable code for naturally hierarchical problems (tree traversal, Tower of Hanoi, divide-and-conquer algorithms like quicksort/merge sort), but each call consumes stack memory, so an unbounded/incorrect base case causes a stack overflow. Time complexity depends on how the recursion branches (e.g. O(n) for factorial, O(2ⁿ) for naive Fibonacci).
Exam takeaway: Every recursive function needs a base case that is actually reachable — without it, the recursion never terminates and the program crashes with a stack overflow.
What is foreign key? When foreign key used?
Model answer
A foreign key is one or more columns in a table that reference the primary key of another (or the same) table, establishing and enforcing a link between the two tables' data.
Example:
erDiagram
DEPARTMENT ||--o{ EMPLOYEE : employs
DEPARTMENT {
int dept_id PK
string dept_name
}
EMPLOYEE {
int emp_id PK
string name
int dept_id FK
}
Here, Employee.dept_id is a foreign key referencing Department.dept_id (the primary key of Department) — every employee's department value must exist in the Department table.
CREATE TABLE Employee (
emp_id INT PRIMARY KEY,
name VARCHAR(50),
dept_id INT,
FOREIGN KEY (dept_id) REFERENCES Department(dept_id)
);
When a foreign key is used:
- To model a real-world relationship between two entities (e.g. Employee belongs to a Department, Order belongs to a Customer).
- To enforce referential integrity — the database engine will reject an insert/update that references a non-existent parent row, and can cascade or restrict deletes on the parent.
- To support JOIN queries that combine related data across tables without duplicating it.
Exam takeaway: A foreign key must match a value already present as a primary (or unique) key in the referenced table — this is what "referential integrity" means, and it's the mechanism that prevents "orphan" rows in a relational database.
How many layers are used in OSI and TCP/IP model? Draw the layer.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Write down the problem of asynchronous data transmission? How to solve this Problem using synchronous data transmission?
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Write an SQL Query for 2nd highest score for the table T.
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 · Government IT officer posts guide