Previous Year Questions
Admission syllabusComputer Science and Engineering
430 questionsiv) Which of the following sorting procedure is the slowest? [নীচের কোন sorting পদ্ধতিটি সবচেয়ে ধীরতম?]
Answer & solution / উত্তর ও সমাধান
Correct answer: b. Bubble sort
সাধারণ unsorted input-এ bubble sort-এর quadratic work-এর কারণে expected answer; নির্দিষ্ট input ছাড়া সব ক্ষেত্রে slowest বলা যায় না।
v) ......... creates new data types to contain something different that is not limited to the values fundamental data types may take. [......... একটি নতুন ডাটা টাইপ তৈরি করে, যা ফান্ডামেন্টাল ডাটা টাইপ হতে ভিন্ন কিছু সংরক্ষণ করে।]
- Enumeration
- Union
- Structure
- Queue
Source ambiguity
Answer & solution / উত্তর ও সমাধান
বাক্যটি অস্পষ্ট: enum named integral constants নির্ধারণ করে; struct heterogeneous member-সহ নতুন type তৈরি করে। নির্দিষ্ট type-এর বৈশিষ্ট্য ছাড়া একক সঠিক option নিশ্চিত নয়।
vi) Considering the following set of relations, what is a correct SQL query to find all the employees whose departments are located in ‘Gazipur’ and salary is greater than Tk. 20,000? [নীচের Set of relations এর ভিত্তিতে সঠিক SQL query টি কি যা সব employee কে খুঁজে বের করবে যাদের ডিপার্টমেন্ট ‘Gazipur’ এ এবং salary Tk. 20,000 এর বেশি?] emp (emp_no, emp_name, dept_no, salary) dept (dept_no, dept_name, location)
Answer & solution / উত্তর ও সমাধান
Correct answer: b. Select emp_name from emp where salary > 20,000 and dept_no in (select dept_no from dept where location = ‘Gazipur’);
সঠিক syntax: SELECT emp_name FROM emp WHERE salary > 20000 AND dept_no IN (SELECT dept_no FROM dept WHERE location = 'Gazipur'); source-এর 20,000 SQL numeric literal নয়।
vii) Which module gives control of the CPU to the process selected by the short-term scheduler? [শর্ট-টার্ম সিডিউলার কোন মডিউল দিয়ে প্রসেস সমূহকে CPU তে প্রদান করে?]
Answer & solution / উত্তর ও সমাধান
Correct answer: a. Dispatcher
Dispatcher নির্বাচিত process-কে CPU দেয়।
viii) Physical memory is broken into fixed sized blocks called ....... [Physical memory এর নির্দিষ্ট আকারের বিভক্ত ব্লককে বলে ........।]
Answer & solution / উত্তর ও সমাধান
Correct answer: a. Frames
Physical memory-এর fixed-size blocks হলো frames; virtual memory-এর blocks pages।
ix) Communication between a computer and a keyboard involves ....... transmission. [কম্পিউটার ও কি বোর্ডের মধ্যে যোগাযোগ হলো ......... ট্রান্সমিশন।]
Answer & solution / উত্তর ও সমাধান
Correct answer: d. simplex
প্রশ্নের সরল data-flow model-এ keyboard থেকে computer: simplex। বাস্তব USB/PS2 link bidirectional control-ও বহন করে।
x) The 802.16 is a standard for ....... [802.16 হলো ......... এর স্ট্যান্ডার্ড।]
Answer & solution / উত্তর ও সমাধান
Correct answer: c. Broadband wireless
IEEE 802.16: broadband wireless access।
xi) In 1-to-4 multiplexer, how many select lines are required? [1-to-4 multiplexer এর কয়টি সিলেক্ট লাইন প্রয়োজন?]
Answer & solution / উত্তর ও সমাধান
Correct answer: a. 2
4টি line নির্বাচন করতে log2(4) = 2 select bit। 1-to-4 device-টির সঠিক নাম demultiplexer।
xii) A 2 ohms resistor having 1 ampere current will dissipate the power of ...... [একটি 2 ohm রেজিস্টারে মধ্যে দিয়ে 1 ampere বিদ্যুৎ প্রবাহিত হলে ......... পাওয়ার নির্গত হবে।]
Answer & solution / উত্তর ও সমাধান
Correct answer: a. 2 watts
\(P=I^2R=1^2\times2=2\,\mathrm W\)।
01. (a) Write down a program in C language that takes three sides of a triangle as input and determine whether they from a valid triangle or not. [C language- এ একটি প্রোগ্রাম লিখ যা ত্রিভুজের তিনটি বাহু ইনপুট হিসাবে নিবে এবং ওই বাহু তিনটি দ্বারা সঠিক ত্রিভুজ গঠিত হবে কিনা তা নির্ধারণ করবে।] (08)
Answer & solution / উত্তর ও সমাধান
#include <stdio.h>
int main(void) {
double a, b, c;
if (scanf("%lf%lf%lf", &a, &b, &c) != 3) return 1;
int valid = a > 0 && b > 0 && c > 0
&& a + b > c && a + c > b && b + c > a;
puts(valid ? "Valid triangle" : "Invalid triangle");
return 0;
}
01. (b) Write down the difference between local and global variable in C language? [C language- এ লোকাল এবং গ্লোবাল ভেরিয়েবলের মধ্যকার পার্থক্য লিখ।] (06)
Answer & solution / উত্তর ও সমাধান
| Local | Global |
|---|---|
| Block/function-এর ভিতরে declared | Function-এর বাইরে file scope-এ declared |
| Scope enclosing block | Declaration visible এমন scope-এ ব্যবহারযোগ্য |
| Automatic local সাধারণত block শেষ হলে শেষ হয়; static local টিকে থাকে | Static storage duration: program চলাকালীন টিকে থাকে |
| Explicit initializer না থাকা automatic local-এর value indeterminate | Uninitialized global zero-initialized |
02. (a) Suppose a coin is flipped three times. What is the probability of getting a tail twice and a head once? [একটি মুদ্রাকে তিনবার নিক্ষেপ করা হল। দুই বার টেইল ও একবার হেড পাওয়ার সম্ভাবনা কত?] (07)
Answer & solution / উত্তর ও সমাধান
Fair ও independent coin toss ধরে favorable ফল HTT, THT, TTH।
\[P=\binom32(1/2)^3=\boxed{3/8}\]
(b) Define tautology. Prove that \(\left( \left( \mathbf{A}\mathbf{\rightarrow}\mathbf{B} \right)\mathbf{\land}\mathbf{A} \right)\mathbf{\rightarrow}\mathbf{B}\) is a tautology using a truth table. [Tautology এর সংজ্ঞা দাও। Truth table দ্বারা প্রমাণ কর যে, \(\left( \left( \mathbf{A}\mathbf{\rightarrow}\mathbf{B} \right)\mathbf{\land}\mathbf{A} \right)\mathbf{\rightarrow}\mathbf{B}\) একটি tautology।] (07)
Answer & solution / উত্তর ও সমাধান
সকল truth assignment-এ সত্য compound proposition হলো tautology।
| A | B | A → B | (A → B) ∧ A | ((A → B) ∧ A) → B |
|---|---|---|---|---|
| F | F | T | F | T |
| F | T | T | F | T |
| T | F | F | F | T |
| T | T | T | T | T |
03. (a) Briefly explain stack data structure with an example. [Stack ডাটা-স্ট্রাকচার উদাহরণসহ সংক্ষেপে ব্যাখ্যা কর।] (06)
Answer & solution / উত্তর ও সমাধান
Stack হলো LIFO data structure। Push top-এ যোগ করে, pop top থেকে সরায়। Recursion-এ প্রতিটি call-এর return address, arguments ও local context সংরক্ষিত হয়; সর্বশেষ call প্রথমে return করে।
push(10): [10]
push(20): [10, 20] <- top
pop(): returns 20; stack = [10]
(b) What are the advantages and disadvantages of binary search algorithm? [বাইনারি সার্চ অ্যালগরিদম এর সুবিধা- অসুবিধা গুলো কি কি?] (08)
Answer & solution / উত্তর ও সমাধান
Binary search sorted random-access sequence-এর search interval প্রতি ধাপে অর্ধেক করে।
- Average/worst-case time \(O(\log n)\); best case \(O(1)\)।
- Iterative implementation-এ extra space \(O(1)\)।
- ডেটা sorted রাখতে হয়; sorting/update-এর খরচ থাকে।
- Linked list-এ middle access সরাসরি হয় না, তাই array-এর মতো সুবিধা পাওয়া যায় না।