কম্পিউটার সায়েন্স এন্ড ইঞ্জিনিয়ারিং
Subjects / বিষয়
Non-Technical · Shared by all departments
পদার্থ বিজ্ঞান
8 chapters
Non-Technical · Shared by all departments
রসায়ন
15 chapters
Non-Technical · Shared by all departments
গণিত
4 chapters
Non-Technical · Shared by all departments
ইংরেজি
11 chapters
Technical
Computer Science and Engineering
12 chapters
Questions
0 read · 0 practiced · 0 answered in examsvi) The direct connection is made between sendet and receiver so data can be transmitted: [প্রেরক ও প্রাপকের মধ্যে ডাটা সঞ্চালনের জন্য সরাসরি সংযোগ তৈরি হয়:]
Correct answer: c
Circuit switching-এ dedicated communication path স্থাপন হয়।
vii) Variable which can be acccssed by all modules of the program is called- [যে variable প্রোগ্রামের সব মডিউল অ্যাকসেস করতে পারে তাকে বলে-]
Correct answer: a
Global variable, declaration ও linkage-এর scope সাপেক্ষে।
viii) What is the following declaration for? [নিচের declaration টি কী জন্যে?] int(*α) [10];
Correct answer: a
int (*p)[10] হলো 10 integer-এর array-এর pointer।
ix) Which one of the following is the WiFi standard? [নিচের কোনটি WiFi standerd?]
Correct answer: c
Wi-Fi IEEE 802.11 family-এর ওপর ভিত্তি করে।
x) If we write a program in a programming language and switch to SQL when we require to use the database , then the SQL environment in use is know as [যদি আমরা যেকোন প্রোগ্রামিং ল্যাঙ্গুয়েজে একটি প্রোগ্রাম লিখি এবং তা database এর প্রয়োজনে SQL এর সাথে যুক্ত করি তখন তাকে বলে-]
Correct answer: b
Host language-এর মধ্যে SQL ব্যবহার: embedded SQL।
x) Dual role of NAND function is- [NAND ফাংশন এর DUAL হলো-]
Correct answer: c
Dual-এ AND ও OR অদলবদল হয়: NAND-এর dual NOR।
1. (a) What is token? List different types of token in C++. [টোকেন কি? C++ এর বিভিন্ন প্রকার টোকেন এর তালিকা দাও।] (07)
CQ / Written solution
Token হলো source program-এর ক্ষুদ্রতম meaningful lexical unit। C++ token-এর প্রধান ধরন: keywords, identifiers, literals, operators ও punctuators।
int count = 10;
// int: keyword; count: identifier; 10: literal; =: operator; ;: punctuator
(b) What is polymorphism? Differentiate between method overriding and method overloading? [Polymorphism কি? method overriding এবং method overloading এর মধ্যে পার্থক্য কর।] (07)
CQ / Written solution
Polymorphism হলো একই interface দিয়ে বিভিন্ন ধরনের object-এর উপযুক্ত আচরণ পাওয়া।
- Compile-time: function/operator overloading।
- Run-time: virtual function overriding; base pointer/reference দিয়ে derived implementation চালানো।
- সুবিধা: পুনর্ব্যবহার, সহজ extension এবং কম coupling।
| Overloading | Overriding |
|---|---|
| একই নাম, ভিন্ন parameter list | Derived class-এ matching virtual function-এর implementation |
| Compile-time overload resolution | Virtual dispatch-এ run-time selection |
| Return type একা বদলে overload হয় না | C++-এ override লিখলে signature compiler যাচাই করে |
2. Write a program in C language to make a SWAP operation. In the program you have to take two inputs in x and y variable and show the x and y output first; and then SWAP the x and y variable values and show the output for new x and y values. [C ল্যাঙ্গুয়েজ এ একটি প্রোগ্রাম লিখ যা SWAP অপারেশন করতে পারে। উক্ত প্রোগ্রামে X ও Y দুইটি ভেরিয়েবলে প্রথমে দুইটি মান ইনপুট হিসেবে নিবে এবং x ও y এর মান আউটপুট এ দেখাবে; পরবর্তীতে x ও y এর মধ্যে SWAP করার পর x ও y এর নতুন মান আউটপুটে দেখাবে।] (14)
CQ / Written solution
#include <stdio.h>
int main(void) {
int x, y;
if (scanf("%d%d", &x, &y) != 2) return 1;
printf("Before: x=%d y=%d\n", x, y);
int temp = x;
x = y;
y = temp;
printf("After: x=%d y=%d\n", x, y);
return 0;
}
3. The king, queen and jack of clubs are removed from a deck of 52 playing cards and then shuffled. A card is drawn from the remaining cards. Find the probability of getting. [ক্লাবস এর রাজা, রানী এবং জ্যাক 52 কার্ড থেকে সরানো হলো এবং তারপর কার্ডটি (Shuffle) হলো, যদি একটি কার্ড থেকে টানা হয়। তাহলে নিম্নলিখিত বিষয়ের সম্ভাব্যতা বের কর।] (14)
(i) a heart (ii) '9' of red color
CQ / Written solution
Club-এর king, queen, jack সরানোর পর card সংখ্যা 49। Heart থাকে 13টি এবং red 9 থাকে 2টি।
\[P(\text{heart})=\frac{13}{49},\qquad P(\text{red nine})=\frac{2}{49}\]