Back to Top

Page Submission Validation

Term and Condition পড়ার পর নিম্নলিখিত checkbox টি click না করলে পরের page এ যাওয়া সম্ভব নয়- website এর effect টি HTML এর সাথে CSS এবং Javascript ব্যবহার করে তৈরি করা হয়- 

I accept the Terms and Conditions

Comment and like to get the source code

Image Changing Effect


image এর উপর মাউস রাখার সাথে সাথে কিভাবে তার পাশে Image টি display হয় তার source code টি নিম্নে উল্লেখ করা হল-

 <========================================================>

<!DOCTYPE html>

<html lang="en">

<head>

  <meta charset="UTF-8">

  <meta http-equiv="X-UA-Compatible" content="IE=edge">

  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <title>Image Change</title>

  <link rel="stylesheet" type="text/css" href="style1.css">

</head>

<body>

  <div class="container">

    <ul class="thumb">

      <li> <a href="ant1.jpg" targer="imgBox"><img src="ant.jpg"/></a></li>

      <li> <a href="apple1.jpg" targer="imgBox"><img src="apple.jpg"/></a></li>

      <li> <a href="arrow1.jpg" targer="imgBox"><img src="arrow.jpg"/></a></li>

      <li> <a href="aunt1.jpg" targer="imgBox"><img src="aunt.png"/></a></li>

    </ul>

    <div class="imgBox"><img src="ant1.jpg"/></div>

  </div>

    <script src="https://code.jquery.com/jquery-3.6.0.js"></script>

 <script type="text/javascript">

$(document).ready(function(){

  $('.thumb a').mouseover(function(e)

  {

    e.preventDefault();

    $('.imgBox img').attr("src",$(this).attr("href"));

  })

})

</script>

</body>

</html>


CSS source Code


body{

    margin: 0;

    padding:0;


}

.container

{

    position:absolute;

    top:50%;

    left:50%;

    transform:translate(-50%,-50%);

}

ul. thumb

{

    margin: 0 auto;

    padding:0;

    float:left;

}

ul.thumb li 

{

  list-style: none;

  margin:5px;

  width:100px;

  height: 100px;

  border:1px solid rgba(134, 74, 74, 0.2);

  overflow:hidden;

}

ul.thumb li img{

    width:100%;

}

.imgBox{

float:left;

width:500px;

height:500px;

border:1px solid rgba(124, 78, 78, 0.2);

overflow:hidden;

}


Dynamic Memory Allocation এবং FILE Operation and Pointer in C Program


Call by Value এবং Call by Reference ব্যাখ্যা কর ।

Call By ValueCall By Reference

Original Value এর কোনো পরিবর্তন হয় না।

এখানে Original Value এর পরিবর্তন হয় ।

এখানে ভেরিয়েবলের অনুলিপি (Copy of variable) পাস হয়ে থাকে। 

এখানে ভেরিয়েবল নিজেই পাস হয়ে থাকে।

Actual এবং Formal Argument ভিন্ন ভিন্ন Memory Location এ তৈরি হয় । 

Actual এবং Formal Argument একই Memory

Location এ তৈরি হয়। 

ভেরিয়েবলের মান কে একটি সরল পদ্ধতি ব্যবহার করে পাস করা হয়

ভেরিয়েবলের ঠিকানা (Address of Variable)সঞ্চয় করতে পয়েন্টার এর প্রয়োজন হয় ।

int main() {

     int x = 10;
     printf("before calling=%d",x);
      increment(x);
     printf("After calling=%d",x);
     getch();
   }
    void increment(int a) {
                 a = a + 1;
                printf("value is=%d",a);
     }

 int main() {

      int x = 10;
      printf("before calling=%d",x);
      increment(&x);
      printf("After calling=%d",x);
      getch();
    }
    void increment(int *a) {
                 *a = *a + 1;
                printf("value is=%d",*a);
     }

Digital Electronics

Sequential Logic Circuit

What is Sequential Logic Circuit (সিকোয়েন্সিয়াল লজিক সার্কিট কি)?

The sequential Logic Circuit has a memory so output depends on the input. Sequential Logic Circuits use flip-flops as memory elements.

[সিকোয়েন্সিয়াল লজিক সার্কিটের মেমরি রয়েছে তাই আউটপুট ইনপুটের উপর নির্ভর করে। সিকোয়েন্সিয়াল লজিক সার্কিট মেমরি উপাদান হিসাবে ফ্লিপ ফ্লপ ব্যবহার করে ।] 

Flip Flop vs Latch

What is Flip Flop (Flip flop কাকে বলে )?

A flip flop is an electronic circuit which two states. A flip flop is used to store 1-bit binary data. [ফ্লিপ ফ্লপ  হল একটি electronic circuit যার দুটি অবস্থা বর্তমান । একটি ফ্লিপ ফ্লপ 1 বিট বাইনারি তথ্য সঞ্চয় করতে ব্যবহৃত হয় । 

What is Latch (Latch কাকে বলে )?

The latch is also an electronics device that has two states and used to store 1-bit binary data. Latch has no clock connection and it is level triggered.[Latch  ও flip flop এর ন্যায় একটি electronic circuit যার দুটি অবস্থা বর্তমান ।Latch  ও 1 বিট বাইনারি তথ্য সঞ্চয় করতে ব্যবহৃত হয় কিন্তু ল্যাচ(Latch) ফ্লিপ ফ্লপ (Flip flop)এর ন্যায় কোন  clock signal প্রদান করা হয় না  এবং ইহা clock pulse এর Level Triggered এ কাজ করে। নিম্নলিখিত ভিডিও তে আর ও বিস্তারিত আলোচনা করা হয়েছে।   ]                                           
  

S-R FlipFlop কাকে বলে ? 

নিম্নলিখিত ভিডিও র মাধ্যমে  S-R flip flop সম্পূর্ণ ব্যাখা দেওয়া হয়েছে।


 D(Data or Delay)-FlipFlop 

নিম্নলিখিত ভিডিও র মাধ্যমে  D flip flop এর সম্পূর্ণ ব্যাখা দেওয়া হয়েছে। D flip flop কে কেন data বা   delay ফ্লিপফ্লপ বলা হয়ে থাকে সে বিষয়ে ও আলোকপাত করা হয়েছে।




J-K-FlipFlop 

নিম্নলিখিত ভিডিও র মাধ্যমে  J-K flip flop এর সম্পূর্ণ ব্যাখা দেওয়া হয়েছে। 



Register, Clock Pulse, and Trigger 

নিম্নলিখিত ভিডিও র মাধ্যমে Register,Clock Pulse and Trigger  এর সম্পূর্ণ ব্যাখা দেওয়া হয়েছে।


নিম্নলিখিত ভিডিও র মাধ্যমে গুরুত্বপূর্ন কয়েকটি Register -এর সম্পূর্ণ ব্যাখা দেওয়া হয়েছে। 






Counter In Digital Electronics: Asynchronous Counter




 








Object Oriented Programming

Year Basis Question and Answer Of  C++ 

[2015]

1) Do the Following Task using C++ language in OOP

a) Design a Class having Name Circle
b) Declare an integer data for taking value of radius of that circle and take that input through get input() function
c) Find out the area of circle using another member function 

Answer

#include<iostream>
using namespace std;
class circle{
public :
int r;
float area;
void input(){
cout<<"Enter radious of circle:";
cin>>r;
}
void findArea(){
                              area=3.14*r*r;
}
void display(){
   cout<<"Area of circle is:";
   cout<<area;
}
};
int main(){
circle obj;
obj.input();
obj.findArea();
obj.display();
}

[2016]

a) Write a program in C++ that accepts two number as input and find the sum using class and object

Answer:

#include<iostream>

using namespace std;

class Sum_Two_Num{

public :

int a,b,sum;

void inputNumber(){

cout<<"Enter Two Number :";

cin>>a>>b;

}

void findSum() {

sum=a+b;

}

void display() {

   cout<<"Sum of two number is:";

   cout<<sum;

}

};

int main(){

Sum_Two_Num obj;

obj.inputNumber();

obj.findSum();

obj.display();

}

b) What is Polymorphism? Explain with example

Answer:

polymorphism is an important concept of object-oriented programming.it means having many forms. Inheritance lets us inherit attributes and methods from another class. Polymorphism uses those methods to perform different tasks. This allows us to perform a single action in different ways.

Example:

class MotorBike {

  public:

    void speed() {

    cout << "This is Hero's speed \n" ;

  }

};

// Derived class

class Honda : public MotorBike {

  public:

    void speed() {

    cout << "This is Honda's speed \n" ;

  }

};

// Derived class

class Enfield : public MotorBike {

  public:

    void speed() {

    cout << "This is Enfield's speed\n" ;

  }

};



[2017]

a) Write a program in C++ to check an integer whether it is odd or even using class and object?

Answer:

#include<iostream>

using namespace std;

class Odd_Even {

    int num;

public:

    void input() {

        cout << "Enter a number:";

        cin>>num;

    }

    void Check_OddEven() {

        if (num % 2 == 0) {

            cout << "Number is even:" << num;

        } else {

            cout << "Number is odd:" << num;

        }

    }

};

int main() {

    Odd_Even obj;

     obj.input();

     obj.Check_OddEven();

     return 0;

}

b) What do you mean by Data Member? Give example?

Data Members are variable which are declared in any class by using any fundamental data types

 (like int, char, float etc) or derived data type (like class, structure, pointer etc.).

There are two types of data member

 1) Private  2) Public 

Example: 

class DataMember {

        private:

                int x;

                float a;

        public:

                 int m;

                float n;

};

OR

a) Give the difference between public and private member of the class in C++

Answer:

Public Private

1. All the class members and functions are available to everyone.

1.The class members can be accessed only by the functions inside the class.

2. The public member can be accessed from anywhere in the program using the dot operator(.)with the object
of that class.

2.the member functions or the friend functions are allowed to access the private data members of a class

Example:
class Subtraction { 
public:
        int a,b;
        int calculate(){
            return (a-b);
     }
};
int main(){
      Substraction obj;
      // accessing public data member outside class
      obj.a=20;
      obj.b=10;
      cout<<"Substraction is: " << obj.calculate();
      return 0;
}

Example:
class Subtraction {
     private:
              int a,b;
     private:
              void calculate(int x,int y){
                a=x;
                b=x;
                int result=a-b;
                cout<<"Substraction is="<<result;
            }
};
int main(){
            Substration obj;
            obj.calculate(20,10);
            return 0;
}


b) Describe the characteristic of destructor in C++

Answer:

  • The destructor has the same name as that of the class prefixed by the tilde character ‘~’.

  • The destructor cannot have parameters.

  • It has no return type

  • there can be only one destructor in a class

  • The destructor is executed automatically when the control reaches the end of the class scope to destroy the object


c) What do you mean by "get from" Operator in C++? Give example?

Ans: Extraction Operator (>>) sometimes known as "get from" operator which is usually used for input data from the user.

[2018]

a) Write a program in C++ using class and object to check an integer whether is a prime number or not.

Answer:

using namespace std;  

int main()  

{  

  int n, i,check=0;  

  cout << "Enter the Number to check Prime: ";  

  cin >> n;  

  for(i = 2; i <=n/2; i++)    {  

      if(n % i == 0)  

      {  

          cout<<"Number is not Prime."<<endl;  

          check=1;  

          break;  

      }  

  }  

  if (Check==1)  {

      cout << "Number is Prime."<<endl;  

  return 0;  

}  

b) What is the member function? Give example?

A member function of a class is a function that has its definition or its prototype within or outside the class. member function knows as a method also.

There are two way to define a function

  1) inside the class-defined directly

  2) outside of the class- using scope resolution operator(::) along with class name

Example: 

// Member functions defined within class

class Circle {

   public:

      double r=2.5;         // variable

      double getArea(void) {

        return 3.14*r*r;

      }};

//OR Member functions defined outside of the class

class Circle {

   public:

      double r=2.5;         // variable        

};

class Circle::double getArea(void)    {

        return 3.14*r*r;

      }

int main(){

     Circle obj;

     cout<<"Area of Circle:"<<obj.double getArea();

}

OR

a) Write a program in C++ to find out the factorial of a given integer (N!= 1x2x3x........N)

Answer:

using namespace std;

class FindFactorial {

public:

    int factorial(int N) {

        int i, f = 1;

        for (i = 1; i <= N; i++) {

            f = f*i;

        }

        return f;

    }

};

int main() {


    FindFactorial obj;

    int N;

    cout << "Enter a number:";

    cin >> N;

    cout << "Factorial is:" << obj.factorial(N);

    return 0;

}

b) How a member function can be declared outside of the class? Give example?

Anwser:

A member function can be declared outside of the class using the scope resolution operator (::) along with the class name.

Example:

class Circle {

   public:

      double r=2.5;         // variable        

};

class Circle::double getArea(void)    {

        return 3.14*r*r;

      }

int main(){

     Circle obj;

     cout<<"Area of Circle:"<<obj.double getArea();

}

[2019]

a) Write a program in C++ using class and object to find out the sum 1 to N where N is an integer given as input.

Answer:

#include<iostream>
using namespace std;
class Sum_Of_N_Num{
public :
int N,i,sum=0;
void inputNumber(){
cout<<"Enter Number :";
cin>>N;
}
void findSum()
{
for(i=0; i<=N; i++){
sum=sum+i;
}
}
void display()
{
   cout<<"Sum of N number is:";
   cout<<sum;
}
};
int main(){
Sum_Of_N_Num obj;
obj.inputNumber();
obj.findSum();
obj.display();
}

b)Write a function of setw and endl manipulator.

Answer:

endl

 This manipulator has the same functionality as ‘\n’(newline character). But this also flushes the output stream.

setw()

 This manipulator declare in imanip.h . it changes the width of the output field. When used in an expression out << setw(n)output field.

Example:

#include<iostream>

#include<iomanip>

using namespace std;

int main(){

            cout<<"USING setw() ..............\n";

    cout<< setw(10) <<11<<endl;

    cout<< setw(10) <<2222<<endl;

    cout<< setw(10) <<33333<<endl;

    cout<< setw(10) <<4<<endl;

}

OR

a) Write a program in C++ to print the reverse of given number.

Answer:

#include <iostream>

using namespace std;

int main() {

    int num, revNum = 0, rem;


    cout << "Enter an integer: ";

    cin >> num;

    while(num!= 0) {

        rem = num%10;

        num /= 10;

        revNum = revNum*10 + rem;     

    }

    cout << "Reversed Number = " << revNum;

    return 0;

}


b) what do you mean by reference variable? Give example?

Answer:

When a variable is declared as a reference, it becomes an alternative name for an existing variable. A variable can be declared as a reference by putting '&' in the declaration.

Example:

#include<iostream>

using namespace std;

int main(){

int x=10;

int& ref=x;

//value of x is now changed

ref=20;

cout<<"x="<<x<<endl;

//value of ref is now changed

x=30;

cout<<"ref="<<ref<<endl;

return 0;

}