Loading...
Bangladesh Industrial Technical Assistance Center

Post: Assistant Programmer
Exam Date: 27/10/2023, Exam Taker: BUTEX
1. Write Concept of cache memory in computer. How its change performance of computer?

Concept of Cache Memory

Cache memory is a small, high-speed memory located between the CPU and main memory (RAM). It stores frequently used data and instructions so that the CPU can access them quickly without repeatedly accessing slower main memory.

How Cache Memory Improves Computer Performance

Cache memory reduces the average time required to access data by keeping commonly used information closer to the CPU. Since cache memory is much faster than RAM, the CPU can execute instructions more quickly, resulting in faster processing speed, reduced latency, and overall improved system performance.

Cache Memory-এর ধারণা

Cache memory হলো একটি ছোট কিন্তু অত্যন্ত দ্রুতগতির memory, যা CPU এবং main memory (RAM)-এর মাঝখানে অবস্থান করে। এতে বারবার ব্যবহৃত data ও instruction সংরক্ষণ করা হয়, যাতে CPU দ্রুত সেগুলো access করতে পারে।

Cache Memory কীভাবে Computer-এর Performance বাড়ায়

Cache memory বারবার RAM থেকে data আনার প্রয়োজন কমিয়ে দেয়, ফলে data access করার সময় কম লাগে। Cache memory RAM-এর তুলনায় অনেক দ্রুত হওয়ায় CPU দ্রুত instruction execute করতে পারে এবং এর ফলে computer-এর processing speed ও overall performance বৃদ্ধি পায়।

2. What is dual channel RAM? Difference between single In-Line and Dual In-Line Memory Module.

Dual Channel RAM

Dual Channel RAM is a memory technology where two RAM modules work together simultaneously to increase data transfer speed between the RAM and the CPU. It improves system performance by allowing the processor to access memory through two channels instead of one.

Difference between SIMM and DIMM

AspectSIMM (Single In-Line Memory Module)DIMM (Dual In-Line Memory Module)
DefinitionOlder type of memory module with single signal pathModern memory module with separate signal paths on both sides
Pin ConnectionSame electrical signals on both sidesDifferent electrical signals on each side
Data Width32-bit or less64-bit or more
UsageUsed in older computersUsed in modern computers and servers

Dual Channel RAM

Dual Channel RAM হলো একটি memory technology যেখানে দুটি RAM module একসাথে কাজ করে CPU ও RAM-এর মধ্যে data transfer speed বাড়ায়। এতে processor একসাথে দুইটি channel ব্যবহার করে memory access করতে পারে, ফলে system performance উন্নত হয়।

SIMM ও DIMM-এর পার্থক্য

বিষয়SIMM (Single In-Line Memory Module)DIMM (Dual In-Line Memory Module)
সংজ্ঞাপুরোনো ধরনের memory moduleআধুনিক memory module
Pin Connectionদুই পাশে একই signal থাকেদুই পাশে আলাদা signal থাকে
Data Width৩২-bit বা তার কম৬৪-bit বা তার বেশি
ব্যবহারপুরোনো computer-এ ব্যবহৃতআধুনিক computer ও server-এ ব্যবহৃত
3. What is virtual function with example?

Virtual Function

A virtual function is a member function of a class that is declared using the virtual keyword and is meant to be overridden in a derived class. It supports runtime polymorphism by ensuring that the correct function is called based on the object type, not the pointer type.

Example of Virtual Function (C++)

#include <iostream>
using namespace std;

class Base {
public:
    virtual void show() {
        cout << "This is Base class show function";
    }
};

class Derived : public Base {
public:
    void show() {
        cout << "This is Derived class show function"; } }; int main() { Base* b; Derived d; b = &d; b->show();
    return 0;
}

Explanation: Although the pointer is of type Base, the Derived class function is called at runtime because the function is virtual.

Virtual Function

Virtual function হলো class-এর একটি member function যা virtual keyword দিয়ে declare করা হয় এবং derived class-এ override করা যায়। এটি runtime polymorphism বাস্তবায়নে সাহায্য করে।

Virtual Function-এর উদাহরণ (C++)

#include 
using namespace std;

class Base {
public:
    virtual void show() {
        cout << "This is Base class show function";
    }
};

class Derived : public Base {
public:
    void show() {
        cout << "This is Derived class show function"; } }; int main() { Base* b; Derived d; b = &d; b->show();
    return 0;
}

ব্যাখ্যা: এখানে pointer Base type হলেও runtime-এ Derived class-এর function call হয়, কারণ function-টি virtual।

4. Write a C code that show factorial of a number.
#include <stdio.h>
int main() {
    int n, i;
    long long fact = 1; // Changed from unsigned long long
    printf("Enter an integer: ");
    scanf("%d", &n);
    // Shows error if the user enters a negative integer
    if (n < 0)
        printf("Error! Factorial of a negative number doesn't exist.");
    else {
        for (i = 1; i <= n; ++i) {
            fact *= i;
        }
        printf("Factorial of %d = %lld", n, fact);
    }
    return 0;
}
5. Which one of the following regular expressions represents the language: the set of all binary strings having two consecutive 0s and two consecutive 1s?
a. (0+1) *0011 (0+1)* +(0+1) *1100 (0+ 1)*
b. (0+1) *(00(0+1)*11+11(0+1)*00) (0+ 1)*
c. (0+1) *00 (0+1)* +(0+1) *11 (0 + 1)*
d. 00 (0+1) *11 + 11 (0+1) *00

Correct Answer: Option (b)

Regular Expression:

(0+1)*(00(0+1)*11 + 11(0+1)*00)(0+1)*

Explanation:

The given regular expression represents the set of all binary strings that contain at least two consecutive 0s and at least two consecutive 1s.

The part (0+1)* allows any binary string before the required pattern appears.

The expression 00(0+1)*11 ensures that the string contains two consecutive 0s followed at some point by two consecutive 1s.

Similarly, 11(0+1)*00 ensures that the string contains two consecutive 1s followed at some point by two consecutive 0s.

The final (0+1)* allows any binary string after the required pattern.

Thus, this regular expression correctly matches all binary strings containing both two consecutive 0s and two consecutive 1s.

সঠিক উত্তর: Option (b)

Regular Expression:

(0+1)*(00(0+1)*11 + 11(0+1)*00)(0+1)*

ব্যাখ্যা:

এই regular expression এমন সব binary string নির্দেশ করে যেগুলোর মধ্যে কমপক্ষে দুইটি consecutive 0 এবং দুইটি consecutive 1 রয়েছে।

(0+1)* অংশটি প্রয়োজনীয় pattern-এর আগে যেকোনো binary string গ্রহণ করে।

00(0+1)*11 অংশটি নিশ্চিত করে যে string-এ প্রথমে দুইটি consecutive 0 এবং পরে দুইটি consecutive 1 আছে।

একইভাবে, 11(0+1)*00 অংশটি string-এ প্রথমে দুইটি consecutive 1 এবং পরে দুইটি consecutive 0 থাকার বিষয়টি নিশ্চিত করে।

শেষের (0+1)* অংশটি pattern-এর পরে যেকোনো binary string গ্রহণ করে।

অতএব, এই regular expression সঠিকভাবে সেই সব binary string প্রকাশ করে যেগুলোতে দুইটি consecutive 0 এবং দুইটি consecutive 1 উভয়ই রয়েছে।

Leave a Comment

Latest Post
Field Based Job Question & Solution
Bank IT Job Solution

MCQ + Written from Bangladesh Bank, Sonali, Combined Bank IT recruitment.

BPSC IT Job Solution

BPSC Computer/IT cadre & non-cadre post Question papers with full solutions.

Gas Field IT Job Solution

Gas field like TGTDCL, BGDCL, JGTDSL, KGDCL, SGCL, RPGCL, GTCL etc. question solution

Power Sector IT Job Solution

Power sector such as NESCO, DESCO, DPDC, WZPDCL, BPDB, PGCB, BREB etc

Other IT Job Solution

Other Govt. Semi govt. organization like BCC, BTCL, CAAB, NSI etc.

NTRCA IT Job Solution (upcoming)

NTRCA ICT-related posts such as Assistant Teacher, Demonstrator, Lecturer.

IT MCQ Job Solution

Collected MCQ Job solution of BANK, BPSC, POWER SECTOR, GAS Field and Others.

Topic Based Q&S
WhatsApp Telegram Messenger