Loading...
Telephone Shilpa Sangstha Ltd.

Post: Assistant Programmer
Exam Date: 2022, Exam Taker: BUET
1. What is NAT? Write down the list of private IP address.

Network Address Translation (NAT)

NAT (Network Address Translation) is a networking technique used by routers to translate private IP addresses into a public IP address before sending data to the Internet.

It allows multiple devices in a private network to share a single public IP address.

Uses of NAT:

1. Conserves public IP addresses.

2. Enhances security by hiding internal IP addresses.

3. Allows multiple devices to access the Internet using one public IP.

List of Private IP Address Ranges (IPv4):

1. 10.0.0.0 – 10.255.255.255 (Class A)

2. 172.16.0.0 – 172.31.255.255 (Class B)

3. 192.168.0.0 – 192.168.255.255 (Class C)

Network Address Translation (NAT)

NAT (Network Address Translation) হলো একটি Networking Technique, যা Router ব্যবহার করে Private IP Address-কে Public IP Address-এ রূপান্তর করে Internet-এ পাঠায়।

এর মাধ্যমে একটি Private Network-এর একাধিক Device একটি Public IP ব্যবহার করে Internet-এ সংযুক্ত হতে পারে।

NAT-এর ব্যবহার:

১. Public IP সংরক্ষণ করে।

২. Internal IP Address গোপন রেখে নিরাপত্তা বৃদ্ধি করে।

৩. একাধিক Device-কে একটি Public IP দিয়ে Internet ব্যবহার করতে দেয়।

Private IP Address Range (IPv4):

১. 10.0.0.0 – 10.255.255.255 (Class A)

২. 172.16.0.0 – 172.31.255.255 (Class B)

৩. 192.168.0.0 – 192.168.255.255 (Class C)

2. What is MAC flooding? How to prevent MAC flooding?

MAC Flooding

MAC Flooding is a network attack where an attacker sends a large number of fake MAC addresses to a network switch.

A switch maintains a MAC Address Table (CAM table) to forward frames to the correct port. When the table becomes full due to fake MAC addresses, the switch enters fail-open mode and starts broadcasting traffic to all ports.

As a result, attackers can capture network traffic, leading to security risks such as data interception or Man-in-the-Middle (MITM) attacks.

How to Prevent MAC Flooding:

1. Enable Port Security: Limit the number of MAC addresses allowed per port.

2. Set Static MAC Addresses: Configure fixed MAC addresses on important ports.

3. Use VLANs: Segment the network to reduce the impact of attacks.

4. Enable MAC Address Filtering: Allow only authorized devices.

5. Use Network Monitoring Tools: Detect unusual traffic patterns.

MAC Flooding

MAC Flooding হলো একটি Network Attack, যেখানে আক্রমণকারী অনেকগুলো ভুয়া MAC Address Switch-এ পাঠায়।

Switch একটি MAC Address Table (CAM Table) সংরক্ষণ করে, যার মাধ্যমে Data Frame সঠিক Port-এ পাঠানো হয়। যখন ভুয়া MAC Address দিয়ে Table পূর্ণ হয়ে যায়, তখন Switch Fail-Open Mode-এ চলে যায় এবং সব Port-এ Data Broadcast করতে শুরু করে।

এর ফলে আক্রমণকারী Network Traffic Capture করতে পারে, যা Data Interception বা Man-in-the-Middle (MITM) Attack-এর ঝুঁকি সৃষ্টি করে।

MAC Flooding প্রতিরোধের উপায়:

১. Port Security চালু করা: প্রতি Port-এ নির্দিষ্ট সংখ্যক MAC Address সীমাবদ্ধ করা।

২. Static MAC Address ব্যবহার: গুরুত্বপূর্ণ Port-এ নির্দিষ্ট MAC Address নির্ধারণ করা।

৩. VLAN ব্যবহার: Network Segment করে Attack-এর প্রভাব কমানো।

৪. MAC Filtering চালু করা: অনুমোদিত Device ছাড়া অন্যদের প্রবেশ বন্ধ করা।

৫. Network Monitoring Tool ব্যবহার: অস্বাভাবিক Traffic শনাক্ত করা।

3. Write down the properties of OOP?

Properties of Object-Oriented Programming (OOP)

Object-Oriented Programming (OOP) is a programming paradigm based on objects and classes. The main properties of OOP are:

1. Encapsulation: Encapsulation is the process of wrapping data (variables) and methods (functions) together into a single unit called a class. It restricts direct access to data and protects it from unauthorized modification.

2. Abstraction: Abstraction hides internal implementation details and shows only essential features to the user. It reduces complexity.

3. Inheritance: Inheritance allows one class (child class) to acquire properties and methods of another class (parent class). It promotes code reusability.

4. Polymorphism: Polymorphism allows one function or method to behave differently in different situations. It can be achieved through method overloading and method overriding.

These four properties make OOP powerful, reusable, and easy to maintain.

Object-Oriented Programming (OOP)-এর বৈশিষ্ট্যসমূহ

Object-Oriented Programming (OOP) হলো একটি Programming Paradigm, যা Object ও Class-এর উপর ভিত্তি করে গঠিত। OOP-এর প্রধান বৈশিষ্ট্যগুলো হলো:

১. Encapsulation: Data (Variable) ও Method (Function) একত্র করে একটি Class-এর মধ্যে রাখা হয়। এটি Data-কে সরাসরি Access থেকে সুরক্ষিত রাখে।

২. Abstraction: অপ্রয়োজনীয় Internal Implementation লুকিয়ে রেখে শুধুমাত্র প্রয়োজনীয় Feature দেখানো হয়। এতে Complexity কমে।

৩. Inheritance: একটি Class অন্য একটি Class-এর Property ও Method গ্রহণ করতে পারে। এতে Code Reusability বৃদ্ধি পায়।

৪. Polymorphism: একই Method বিভিন্ন পরিস্থিতিতে ভিন্নভাবে কাজ করতে পারে। এটি Method Overloading ও Method Overriding-এর মাধ্যমে অর্জিত হয়।

এই চারটি বৈশিষ্ট্য OOP-কে শক্তিশালী, পুনঃব্যবহারযোগ্য ও সহজে রক্ষণাবেক্ষণযোগ্য করে তোলে।

4. What will be the output
#include<stdio.h>
void main()
{
int a[5] = {5, 1, 15, 20, 25};
int i, j, m;
i = ++a[1];
j = a[1]++;
m = a[i++];
printf("%d, %d, %d", i, j, m);
}
Output:

3, 2, 15

Output Explanation:

The initial array is declared as int a[5] = {5, 1, 15, 20, 25};

1. i = ++a[1];
– The value of a[1] (which is 1) is incremented before assignment due to the prefix increment operator ++.
– Thus, a[1] becomes 2.
– The value of i is then assigned 2.

2. j = a[1]++;
– The value of a[1] (which is currently 2) is assigned to j first.
– After the assignment, a[1] is incremented to 3 because of the postfix increment operator ++.
– Thus, j is 2, and a[1] is now 3.

3. m = a[i++];
– The value of i is currently 2.
– The expression a[i++] uses a[2] (which is 15) and assigns it to m.
– After the assignment, i is incremented to 3 due to the postfix increment operator ++.
– Thus, m is 15, and i is now 3.

4. Final Output:
– The values of i, j, and m are printed as: 3, 2, 15.

5. Write a C/C++ program to find out the prime from 1 to N.

#include <iostream>
using namespace std;

bool isPrime(int num)
{
if (num <= 1) return false;
for (int i = 2; i <= num / 2; ++i)
{
if (num % i == 0) return false;
}
return true;
}

int main()
{
int N;
cout << “Enter the value of N: “;
cin >> N;

cout << “Prime numbers from 1 to “ << N << ” are: “;
for (int i = 2; i <= N; ++i)
{
if (isPrime(i))
{
cout << i << ” “;
}
}
cout << endl;
return 0;
}

1

7. There are two tables like Employees (Employee_Id, First_Name, Last Name, Email, Phone Number, Hire_Date, Job_Id) and Departments (Department_Id, Department_Name, Manager_Id, Location_Id). Now, write a query to find the name (first_name, last name), department ID and name of all the employees.
SELECT Employees.First_Name, Employees.Last_Name, 
       Departments.Department_Id, Departments.Department_Name
FROM Employees
JOIN Departments ON Employees.Job_Id = Departments.Department_Id;

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