From 7695c82b5a599238168e5e989090f32937befb0d Mon Sep 17 00:00:00 2001 From: "Md. Fahim Bin Amin" Date: Tue, 25 Mar 2025 20:01:51 +0600 Subject: [PATCH 1/3] fix: hyperlink issue --- basic-questions.md | 141 +++++++++++++++++++++++---------------------- 1 file changed, 72 insertions(+), 69 deletions(-) diff --git a/basic-questions.md b/basic-questions.md index 6d641d4..9950d02 100644 --- a/basic-questions.md +++ b/basic-questions.md @@ -2,39 +2,39 @@ ## কন্টেন্ট সূচি -| # | প্রশ্ন | উদাহরণ | -|----|------------------------------------------------------|------------| -| ১ | [What is scope?](#১-what-is-scope) | [উদাহরণ](#উদাহরণ) | -| ২ | [What is block?](#২-what-is-block) | [উদাহরণ: (Nested Block Scope)](#উদাহরণ-nested-block-scope) | -| ৩ | [How many types of scopes are there in Golang?](#৩-how-many-types-of-scopes-are-there-available-on-golang) | | -| ৪ | [What is the standard or named function?](#৪-what-is-the-standard-or-named-function) | [উদাহরণ](#উদাহরণ-1) | -| ৫ | [What is anonymous function?](#৫-what-is-anonymous-function) | [উদাহরণ](#উদাহরণ-2) | -| ৬ | [What is expression?](#৬-what-is-expression) | [উদাহরণ](#উদাহরণ-3) | -| ৭ | [What is function expression?](#৭-what-is-function-expression) | [উদাহরণ](#উদাহরণ-4) | -| ৮ | [What is immediately invoked function expression (IIFE)?](#৮-what-is-immediately-invoked-function-expression-iife) | [উদাহরণ](#উদাহরণ-5) | -| ৯ | [Difference between arguments and parameters](#৯-difference-between-arguments-and-parameters) | [উদাহরণ](#উদাহরণ-6) | -| ১০ | [What is first-class function or higher-order function?](#১০-what-is-first-class-function-or-higher-order-function) | [উদাহরণ](#উদাহরণ-7) | -| ১১ | [Difference between first-order function and higher-order function](#১১-difference-between-first-order-function-and-higher-order-function) | | -| ১২ | [Difference between first-order logic and higher-order logic](#১২-difference-between-first-order-logic-and-higher-order-logic) | | -| ১৩ | [What is callback function?](#১৩-what-is-callback-function) | [উদাহরণ](#উদাহরণ-8) | -| ১৪ | [What is the first-class citizen?](#১৪-what-is-the-first-class-citizen) | | -| ১৫ | [What is init function?](#১৫-what-is-init-function) | [উদাহরণ](#উদাহরণ-9) | -| ১৬ | [Difference between compile time and run time](#১৬-difference-between-compile-time-and-run-time) | [কম্পাইল টাইম](#কম্পাইল-টাইম-compile-time), [রান টাইম](#রান-টাইম-run-time) | -| ১৭ | [What is escape analysis?](#১৭-what-is-escape-analysis) | [উদাহরণ](#উদাহরণ-10) | -| ১৮ | [Describe 2 phases of running a Go program](#১৮-describe-2-phases-of-running-a-go-program) | [উদাহরণ](#উদাহরণ-11) | -| ১৯ | [What is closure in Go?](#১৯-what-is-closure-in-go) | [উদাহরণ](#উদাহরণ-12) | -| ২০ | [What is struct in Go?](#২০-what-is-struct-in-go) | [উদাহরণ](#উদাহরণ-13) | -| ২১ | [What is an instance?](#২১-what-is-an-instance) | [উদাহরণ](#উদাহরণ-14) | -| ২২ | [What are member variables?](#২২-what-are-member-variables) | [উদাহরণ](#উদাহরণ-15) | -| ২৩ | [What is instantiation?](#২৩-what-is-instantiation) | [উদাহরণ](#উদাহরণ-16) | -| ২৪ | [What is the receiver function?](#২৪-what-is-the-receiver-function) | [উদাহরণ](#উদাহরণ-17) | -| ২৫ | [Difference between expression and statement](#২৫-difference-between-expression-and-statement) | [উদাহরণ](#উদাহরণ-18), [পার্থক্য সংক্ষেপে](#পার্থক্য-সংক্ষেপে) | -| ২৬ | [What is pointer? And difference between pass by value vs pass by reference](#২৬-what-is-pointer-and-difference-between-pass-by-value-vs-pass-by-reference) | [উদাহরণ](#উদাহরণ-19) | -| ২৭ | [Difference between pass by value vs pass by reference](#২৭-difference-between-pass-by-value-vs-pass-by-reference) | [উদাহরণ](#উদাহরণ-20), [উদাহরণ](#উদাহরণ-21), [পার্থক্য সংক্ষেপে](#পার্থক্য-সংক্ষেপে-1) | -| ২৮ | [Describe internal memory of a Go program](#২৮-describe-internal-memory-of-a-go-program) | [উদাহরণ](#উদাহরণ-22), [উদাহরণ](#উদাহরণ-23) | - - -## ১। What is scope? +| # | প্রশ্ন | উদাহরণ | +| --- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | +| ১ | [What is scope?](#what-is-scope) | [উদাহরণ](#উদাহরণ) | +| ২ | [What is block?](#what-is-block) | [উদাহরণ: (Nested Block Scope)](#উদাহরণ-nested-block-scope) | +| ৩ | [How many types of scopes are there in Golang?](#how-many-types-of-scopes-are-there-available-on-golang) | | +| ৪ | [What is the standard or named function?](#৪-what-is-the-standard-or-named-function) | [উদাহরণ](#উদাহরণ-1) | +| ৫ | [What is anonymous function?](#৫-what-is-anonymous-function) | [উদাহরণ](#উদাহরণ-2) | +| ৬ | [What is expression?](#৬-what-is-expression) | [উদাহরণ](#উদাহরণ-3) | +| ৭ | [What is function expression?](#৭-what-is-function-expression) | [উদাহরণ](#উদাহরণ-4) | +| ৮ | [What is immediately invoked function expression (IIFE)?](#৮-what-is-immediately-invoked-function-expression-iife) | [উদাহরণ](#উদাহরণ-5) | +| ৯ | [Difference between arguments and parameters](#৯-difference-between-arguments-and-parameters) | [উদাহরণ](#উদাহরণ-6) | +| ১০ | [What is first-class function or higher-order function?](#১০-what-is-first-class-function-or-higher-order-function) | [উদাহরণ](#উদাহরণ-7) | +| ১১ | [Difference between first-order function and higher-order function](#১১-difference-between-first-order-function-and-higher-order-function) | | +| ১২ | [Difference between first-order logic and higher-order logic](#১২-difference-between-first-order-logic-and-higher-order-logic) | | +| ১৩ | [What is callback function?](#১৩-what-is-callback-function) | [উদাহরণ](#উদাহরণ-8) | +| ১৪ | [What is the first-class citizen?](#১৪-what-is-the-first-class-citizen) | | +| ১৫ | [What is init function?](#১৫-what-is-init-function) | [উদাহরণ](#উদাহরণ-9) | +| ১৬ | [Difference between compile time and run time](#১৬-difference-between-compile-time-and-run-time) | [কম্পাইল টাইম](#কম্পাইল-টাইম-compile-time), [রান টাইম](#রান-টাইম-run-time) | +| ১৭ | [What is escape analysis?](#১৭-what-is-escape-analysis) | [উদাহরণ](#উদাহরণ-10) | +| ১৮ | [Describe 2 phases of running a Go program](#১৮-describe-2-phases-of-running-a-go-program) | [উদাহরণ](#উদাহরণ-11) | +| ১৯ | [What is closure in Go?](#১৯-what-is-closure-in-go) | [উদাহরণ](#উদাহরণ-12) | +| ২০ | [What is struct in Go?](#২০-what-is-struct-in-go) | [উদাহরণ](#উদাহরণ-13) | +| ২১ | [What is an instance?](#২১-what-is-an-instance) | [উদাহরণ](#উদাহরণ-14) | +| ২২ | [What are member variables?](#২২-what-are-member-variables) | [উদাহরণ](#উদাহরণ-15) | +| ২৩ | [What is instantiation?](#২৩-what-is-instantiation) | [উদাহরণ](#উদাহরণ-16) | +| ২৪ | [What is the receiver function?](#২৪-what-is-the-receiver-function) | [উদাহরণ](#উদাহরণ-17) | +| ২৫ | [Difference between expression and statement](#২৫-difference-between-expression-and-statement) | [উদাহরণ](#উদাহরণ-18), [পার্থক্য সংক্ষেপে](#পার্থক্য-সংক্ষেপে) | +| ২৬ | [What is pointer? And difference between pass by value vs pass by reference](#২৬-what-is-pointer-and-difference-between-pass-by-value-vs-pass-by-reference) | [উদাহরণ](#উদাহরণ-19) | +| ২৭ | [Difference between pass by value vs pass by reference](#২৭-difference-between-pass-by-value-vs-pass-by-reference) | [উদাহরণ](#উদাহরণ-20), [উদাহরণ](#উদাহরণ-21), [পার্থক্য সংক্ষেপে](#পার্থক্য-সংক্ষেপে-1) | +| ২৮ | [Describe internal memory of a Go program](#২৮-describe-internal-memory-of-a-go-program) | [উদাহরণ](#উদাহরণ-22), [উদাহরণ](#উদাহরণ-23) | + + +

১। What is scope?

স্কোপ হলো একটি নির্দিষ্ট অংশ যেখানে কোনো ভেরিয়েবল বা ফাংশনকে অ্যাক্সেস বা ব্যবহার করা যায়। @@ -70,7 +70,7 @@ func anotherFunction() { --- -## ২। What is block? +

২। What is block?

Block বলতে একটি নির্দিষ্ট অঞ্চল বা সীমানা বোঝায়, যা `{}` দ্বারা আবদ্ধ থাকে। এই ব্লকের মধ্যে যেকোনো কোড লেখা হয় এবং তা একটি নির্দিষ্ট স্কোপ (Scope) তৈরি করে। ব্লকের ভিতরে ডিক্লেয়ার করা ভেরিয়েবল বা ফাংশন শুধুমাত্র ঐ ব্লকের মধ্যেই অ্যাক্সেসযোগ্য হয়। @@ -89,7 +89,7 @@ func nestedBlockExample() { --- -## ৩। How many types of scopes are there available on Golang? +

৩। How many types of scopes are there available on Golang?

1. **Global scope** - পুরো প্রোগ্রামে অ্যাক্সেসযোগ্য। 2. **Local scope** - শুধুমাত্র নির্দিষ্ট ব্লকের ভিতরে অ্যাক্সেসযোগ্য। @@ -97,7 +97,7 @@ func nestedBlockExample() { --- -## ৪। What is the standard or named function? +

৪। What is the standard or named function?

Standard বা Named Function হলো এমন একটি ফাংশন যার একটি নির্দিষ্ট নাম থাকে। ফাংশন কল করার জন্য এই নামটি ব্যবহার করা হয়। @@ -127,8 +127,7 @@ func main() { ``` --- - -## ৫। What is anonymous function? +

৫। What is anonymous function?

Anonymous Function বলতে এমন ফাংশনকে বোঝায় যার কোনো নাম থাকে না। এই ফাংশনগুলো সাধারণত তখনই ব্যবহার করা হয় যখন আমাদের ফাংশনটি শুধুমাত্র একটি নির্দিষ্ট জায়গায় ব্যবহার করার প্রয়োজন হয়, এবং এটিকে পুনরায় ব্যবহার করার দরকার হয় না। @@ -148,7 +147,7 @@ func main() { --- -## ৬। What is expression? +

৬। What is expression?

Expression হলো প্রোগ্রামিং-এ এমন একটি কোডের অংশ যা কোনো নির্দিষ্ট মান (value) তৈরি করে। অন্য কথায়, যখন কোনো কোড একটি ফলাফল বা আউটপুট দেয়, তখন সেই কোডকে এক্সপ্রেশন বলা হয়। @@ -166,7 +165,7 @@ result := add(4, 6) // এটি একটি ফাংশন কল এক্ --- -## ৭। What is function expression? +

৭। What is function expression?

ফাংশন এক্সপ্রেশন (Function Expression) বলতে এমন একটি ফাংশনকে বোঝায় যা একটি ভেরিয়েবলের মধ্যে স্টোর করা হয়। @@ -188,7 +187,7 @@ func main() { --- -## ৮। What is immediately invoked function expression (IIFE)? +

৮। What is immediately invoked function expression (IIFE)?

IIFE - Immediately Invoked Function Expression বলতে এমন একটি ফাংশনকে বোঝায় যা ডিক্লেয়ার করার সাথে সাথে তৎক্ষণাৎ কল করা হয়। অন্য কথায়, এটি একটি ফাংশন যা প্রোগ্রামে লেখার সময়ই এক্সিকিউট হয়ে যায়। এই ফাংশনটি শুধুমাত্র একবার ব্যবহার করা হয়, এবং পরে এটি পুনরায় কল করা যায় না। @@ -207,7 +206,7 @@ func main() { --- -## ৯। Difference between arguments and parameters +

৯। Difference between arguments and parameters

**Parameter:** প্যারামিটার হল ফাংশন ডিফাইন করার সময় যে ভেরিয়েবলগুলো ব্যবহার করা হয়। এগুলো মূলত ফাংশনের জন্য একটা প্লেসহোল্ডার হিসেবে কাজ করে। @@ -225,7 +224,7 @@ result := add(3, 5) // 3 এবং 5 হল আর্গুমেন্ট --- -## ১০। What is first-class function or higher-order function? +

১০। What is first-class function or higher-order function?

Higher-order function বলতে এমন ফাংশনকে বোঝায় যা অন্য ভেরিয়েবলের মতোই ব্যবহার করা যায়। অন্য কথায় ফাংশনটি একটি ভেরিয়েবলে স্টোর করা যায়, যে ফাংশন প্যারামিটারের ইনপুট হিসেবে আরেকটা ফানশনকে রিসিভ করতে পারে এবং অন্য ফাংশন থেকে রিটার্ন করা যায়। @@ -269,7 +268,7 @@ func main() { --- -## ১১। Difference between first-order function and higher-order function +

১১। Difference between first-order function and higher-order function

**First-Order Function:** ফার্স্ট অর্ডার ফাংশন হলো এমন ফাংশন যা অন্য কোনো ফাংশনকে প্যারামিটার হিসেবে গ্রহণ করে না এবং অন্য কোনো ফাংশনকে রিটার্নও করে না। এটি শুধুমাত্র নরমাল ডেটা (যেমন: সংখ্যা, স্ট্রিং, অ্যারে ইত্যাদি) নিয়ে কাজ করে। @@ -279,7 +278,7 @@ func main() { --- -## ১২। Difference between first order logic and higher order logic +

১২। Difference between first order logic and higher order logic

**First Order Logic:** First-Order Logic হলো এমন একটি লজিক সিস্টেম যা শুধুমাত্র Object, Property, Relation নিয়ে কাজ করে। @@ -295,7 +294,9 @@ Higher-Order Logic এমন একটি লজিক সিস্টেম য **বিঃদ্রঃ** GO প্রোগ্রামিং-এ, ফার্স্ট-অর্ডার লজিক হলো সাধারণ ফাংশন যেগুলো শুধু ডেটা নিয়ে কাজ করে। আর হায়ার-অর্ডার লজিক হলো ফাংশন যেগুলো অন্য ফাংশন নিয়ে কাজ করে। -## ১৩। What is callback function? +--- + +

১৩। What is callback function?

Callback Function হলো এমন একটি ফাংশন যা অন্য একটি ফাংশনের ভিতরে প্যারামিটার হিসেবে পাঠানো হয় এবং প্রথম ফাংশনটি যখন প্রয়োজন হয়, তখন এই কলব্যাক ফাংশনটিকে কল করে। অন্য কথায়, কলব্যাক ফাংশন হলো এমন একটি ফাংশন যা অন্য ফাংশনের দ্বারা "কল করার" জন্য পাঠানো হয়। @@ -331,13 +332,13 @@ func main() { --- -### ১৪। What is the first-class citizen? +

১৪। What is the first-class citizen?

First-Class Citizen বলতে বোঝায় যা প্রোগ্রামের মধ্যে অন্য যেকোনো ডেটা টাইপের মতোই ব্যবহার করা যায়। GO-তে ফাংশন হলো ফার্স্ট ক্লাস সিটিজেন, কারণ ফাংশনকে ভেরিয়েবলে স্টোর করা, প্যারামিটার হিসেবে পাঠানো, অথবা অন্য ফাংশন থেকে রিটার্ন করা যায়। --- -### ১৫। What is init function? +

১৫। What is init function?

**init ফাংশন** হলো একটি বিশেষ ফাংশন যা কোনো প্যাকেজ বা ফাইল লোড হওয়ার সময় অটোমেটিকভাবে একবার কল হয়। এটি প্রোগ্রামের প্রাথমিক সেটআপ বা ইনিশিয়ালাইজেশন কাজে ব্যবহৃত হয়, যেমন: ভেরিয়েবল ইনিশিয়ালাইজ করা, ডাটাবেস কানেকশন তৈরি করা, কনফিগারেশন লোড করা ইত্যাদি। @@ -373,7 +374,7 @@ Main function --- -### ১৬। Difference between compile time and run time +

১৬। Difference between compile time and run time

#### **কম্পাইল টাইম (Compile Time):** @@ -393,7 +394,7 @@ Main function --- -### ১৭। What is escape analysis? +

১৭। What is escape analysis?

Escape Analysis হলো গো (Go) প্রোগ্রামিং-এর একটি অপটিমাইজেশন টুল বা প্রক্রিয়া, যা কম্পাইলার দ্বারা ব্যবহৃত হয়। এটি ডিসাইড করে যে কোনো ভেরিয়েবল বা ডেটা ফাংশনের বাইরে ব্যবহার হতে পারে কিনা । এই বিশ্লেষণের উপর ভিত্তি করে কম্পাইলার ডিসাইড করে যে ভেরিয়েবলটি মেমোরির স্ট্যাক (Stack) নাকি হিপ (Heap) - এ store করা হবে। @@ -421,7 +422,7 @@ fmt.Println(*p) --- -### ১৮। Describe 2 phases of running a Go program +

১৮। Describe 2 phases of running a Go program

**১। In the Compilation Phase:** এই Phase এ GO কম্পাইলার সোর্স কোডকে মেশিন কোডে (Executable Binary Code) রূপান্তর করে ও সিনট্যাক্স এবং টাইপ চেকিং করে। @@ -436,7 +437,7 @@ go build main.go # Compilation Phase (creates an executable) --- -### ১৯। What is closure in Go? +

১৯। What is closure in Go?

ক্লোজার(closure) হলো এমন একটি ফাংশন যা তার নিজের স্কোপের বাইরের ভেরিয়েবলগুলোকে "মনে রাখে" এমনকি বাইরের ফাংশনের execution শেষ হবার পরেও এবং সেগুলোকে ব্যবহার করতে পারে। @@ -468,7 +469,7 @@ func main() { --- -### ২০। What is struct in Go? +

২০। What is struct in Go?

**Struct** হলো গো (Go) প্রোগ্রামিং-এর একটি গুরুত্বপূর্ণ ডেটা স্ট্রাকচার। এটি একটি কাস্টম ডেটা টাইপ যা বিভিন্ন ধরনের ডেটা ফিল্ড (ভেরিয়েবল) একত্রে গ্রুপ করে রাখতে ব্যবহৃত হয়। স্ট্রাক্ট ব্যবহার করে আমরা একটি একক ইউনিটে বিভিন্ন ধরনের ডেটা (যেমন: স্ট্রিং, ইন্টিজার, বুলিয়ান ইত্যাদি) সংরক্ষণ করতে পারি। @@ -494,7 +495,7 @@ func main() { --- -### ২১। What is an instance? +

২১। What is an instance?

**Instance** হলো যখন আমরা একটি struct বা কোনো কাস্টম ডেটা টাইপের জন্য একটি ভেরিয়েবল তৈরি করি, তখন সেই ভেরিয়েবলটিকে ওই ডেটা টাইপের একটি ইনস্ট্যান্স বলা হয়। @@ -532,7 +533,7 @@ p1 এবং p2 হলো Person স্ট্রাক্টের দুটি --- -### ২২। What are member variables? +

২২। What are member variables?

Go প্রোগ্রামিং ভাষায় মেম্বার ভেরিয়েবল হল সেই সকল ভেরিয়েবল যা একটি Struct এর ভিতরে Define করা হয়। এগুলিকে আমরা 'ফিল্ড' (Fields) হিসেবেও উল্লেখ করি। স্ট্রাক্টের মেম্বার ভেরিয়েবলগুলি যেকোনো ডাটা টাইপের হতে পারে, যেমন: @@ -567,7 +568,7 @@ type কর্মচারী struct { --- -### ২৩। What is instantiation? +

২৩। What is instantiation?

**Instantiation** হলো একটি ডেটা টাইপের জন্য একটি ইনস্ট্যান্স তৈরি করার পদ্ধতি। @@ -605,7 +606,7 @@ p1 এবং p2 হলো Person স্ট্রাক্টের দুটি --- -### ২৪। What is the receiver function? +

২৪। What is the receiver function?

Go ভাষায় "receiver function" হল একটি মেথড যেটি একটি নির্দিষ্ট টাইপের সাথে যুক্ত থাকে। এই মেথডগুলি একটি স্ট্রাক্ট (struct) বা অন্য কোনো টাইপের উপর অপারেশন সম্পাদন করতে ব্যবহৃত হয়। রিসিভার ফাংশন ডিফাইন করার সময় ফাংশনের নামের আগে একটি রিসিভার প্যারামিটার যোগ করা হয়, যা নির্দেশ করে যে এই মেথডটি কোন টাইপের সাথে যুক্ত। @@ -633,7 +634,7 @@ func main() { --- -### ২৫। Difference between expression and statement +

২৫। Difference between expression and statement

**Expression (এক্সপ্রেশন):** Expression হল এমন একটি কোড অংশ যা একটি মান (value) তৈরি করে। এটি একটি ভ্যারিয়েবল, কনস্ট্যান্ট, অপারেটর, বা ফাংশন কলের সমন্বয়ে গঠিত হতে পারে। প্রতিটি এক্সপ্রেশন একটি নির্দিষ্ট মানে রূপান্তরিত হয়, যেমন: সংখ্যা, স্ট্রিং, বুলিয়ান ইত্যাদি। @@ -643,10 +644,10 @@ Statement হল এমন একটি কোড অংশ যা একটি ## পার্থক্য সংক্ষেপে -| **বিষয়** | **Expression (এক্সপ্রেশন)** | **Statement (স্টেটমেন্ট)** | -| -------------------- | --------------------------------- | ------------------------------ | -| **সংজ্ঞা** | একটি মান তৈরি করে। | কোনো কাজ সম্পাদন করে। | -| **উদাহরণ** | `x + y`, `5 * 3` | `x = 10`, `if x > 5` | +| **বিষয়** | **Expression (এক্সপ্রেশন)** | **Statement (স্টেটমেন্ট)** | +| --------------- | ------------------------ | ---------------------- | +| **সংজ্ঞা** | একটি মান তৈরি করে। | কোনো কাজ সম্পাদন করে। | +| **উদাহরণ** | `x + y`, `5 * 3` | `x = 10`, `if x > 5` | | **প্রোগ্রামের আচরণ** | প্রোগ্রামের আচরণ পরিবর্তন করে না। | প্রোগ্রামের আচরণ পরিবর্তন করে। | #### উদাহরণ @@ -671,7 +672,7 @@ func main() { --- -### ২৬। what is pointer? And difference between pass by value vs pass by reference +

২৬। what is pointer? And difference between pass by value vs pass by reference

**Pointer:** Pointer হলো একটি ভেরিয়েবল যা অন্য একটি ভেরিয়েবলের মেমোরি অ্যাড্রেস স্টোর করে। সহজ কথায়, পয়েন্টার আমাদের বলে দেয় যে, কোনো ডেটা মেমরির কোন স্থানে আছে, এবং আমরা সেই স্থানে গিয়ে ডেটার সাথে কাজ করতে পারি। @@ -696,7 +697,9 @@ func main() { **বিঃদ্রঃ** এখানে p হল পয়েন্টার এবং \*p দিয়ে আমরা x এর মান অ্যাক্সেস করতে পারি। -### ২৭। Difference between pass by value vs pass by reference +--- + +

২৭। Difference between pass by value vs pass by reference

**Pass by value:** যখন আমরা একটি ফাংশনে কোনো আর্গুমেন্ট পাস বাই ভ্যালু হিসেবে পাঠাই, তখন সেই আর্গুমেন্টের একটি কপি তৈরি হয় এবং ফাংশন সেই কপি নিয়ে কাজ করে। ফাংশনের ভিতরে কপির মান পরিবর্তন হলেও মূল ভেরিয়েবলের মান অপরিবর্তিত থাকে। @@ -743,15 +746,15 @@ func main() { #### পার্থক্য সংক্ষেপে -| **বিষয়** | **Pass By Value** | **Pass By Reference** | -| ----------------------- | ------------------------------------ | ----------------------------------------------- | -| **ডাটা পাঠানো** | ভেরিয়েবলের মান পাঠানো হয়। | ভেরিয়েবলের মেমরি অ্যাড্রেস পাঠানো হয়। | -| **মূল মান পরিবর্তন** | মূল ভেরিয়েবলের মান পরিবর্তন হয় না। | মূল ভেরিয়েবলের মান পরিবর্তন হয়। | +| **বিষয়** | **Pass By Value** | **Pass By Reference** | +| ---------------- | ------------------------- | --------------------------------- | +| **ডাটা পাঠানো** | ভেরিয়েবলের মান পাঠানো হয়। | ভেরিয়েবলের মেমরি অ্যাড্রেস পাঠানো হয়। | +| **মূল মান পরিবর্তন** | মূল ভেরিয়েবলের মান পরিবর্তন হয় না। | মূল ভেরিয়েবলের মান পরিবর্তন হয়। | | **ফাংশনে ডাটা ব্যবহার** | মূল ভেরিয়েবলের একটি কপি তৈরি হয়। | কপি তৈরি হয় না, মূল ভেরিয়েবল ব্যবহার করা হয়। | --- -### ২৮। Describe internal memory of a Go program +

২৮। Describe internal memory of a Go program

Go প্রোগ্রাম রান হইলে প্রথমেই র‍্যামের কিছু অংশ অর্থাৎ মেমোরি ব্লক দখল করে ফেলে, প্রথম যে অংশ দখল করে সেটা Code Segment তারপর যে অংশ দখল করে সেটা Data segment এরপর Stack ও Heap নামে আরো ২ টা অংশ দখল করে। From e2e84cc205e34510d49bc8f47090eda210d6b480 Mon Sep 17 00:00:00 2001 From: "Md. Fahim Bin Amin" Date: Tue, 25 Mar 2025 20:08:11 +0600 Subject: [PATCH 2/3] fix: hyperlink issue in TOC --- basic-questions.md | 52 ++++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/basic-questions.md b/basic-questions.md index 9950d02..90c7df7 100644 --- a/basic-questions.md +++ b/basic-questions.md @@ -7,32 +7,33 @@ | ১ | [What is scope?](#what-is-scope) | [উদাহরণ](#উদাহরণ) | | ২ | [What is block?](#what-is-block) | [উদাহরণ: (Nested Block Scope)](#উদাহরণ-nested-block-scope) | | ৩ | [How many types of scopes are there in Golang?](#how-many-types-of-scopes-are-there-available-on-golang) | | -| ৪ | [What is the standard or named function?](#৪-what-is-the-standard-or-named-function) | [উদাহরণ](#উদাহরণ-1) | -| ৫ | [What is anonymous function?](#৫-what-is-anonymous-function) | [উদাহরণ](#উদাহরণ-2) | -| ৬ | [What is expression?](#৬-what-is-expression) | [উদাহরণ](#উদাহরণ-3) | -| ৭ | [What is function expression?](#৭-what-is-function-expression) | [উদাহরণ](#উদাহরণ-4) | -| ৮ | [What is immediately invoked function expression (IIFE)?](#৮-what-is-immediately-invoked-function-expression-iife) | [উদাহরণ](#উদাহরণ-5) | -| ৯ | [Difference between arguments and parameters](#৯-difference-between-arguments-and-parameters) | [উদাহরণ](#উদাহরণ-6) | -| ১০ | [What is first-class function or higher-order function?](#১০-what-is-first-class-function-or-higher-order-function) | [উদাহরণ](#উদাহরণ-7) | -| ১১ | [Difference between first-order function and higher-order function](#১১-difference-between-first-order-function-and-higher-order-function) | | -| ১২ | [Difference between first-order logic and higher-order logic](#১২-difference-between-first-order-logic-and-higher-order-logic) | | -| ১৩ | [What is callback function?](#১৩-what-is-callback-function) | [উদাহরণ](#উদাহরণ-8) | -| ১৪ | [What is the first-class citizen?](#১৪-what-is-the-first-class-citizen) | | -| ১৫ | [What is init function?](#১৫-what-is-init-function) | [উদাহরণ](#উদাহরণ-9) | -| ১৬ | [Difference between compile time and run time](#১৬-difference-between-compile-time-and-run-time) | [কম্পাইল টাইম](#কম্পাইল-টাইম-compile-time), [রান টাইম](#রান-টাইম-run-time) | -| ১৭ | [What is escape analysis?](#১৭-what-is-escape-analysis) | [উদাহরণ](#উদাহরণ-10) | -| ১৮ | [Describe 2 phases of running a Go program](#১৮-describe-2-phases-of-running-a-go-program) | [উদাহরণ](#উদাহরণ-11) | -| ১৯ | [What is closure in Go?](#১৯-what-is-closure-in-go) | [উদাহরণ](#উদাহরণ-12) | -| ২০ | [What is struct in Go?](#২০-what-is-struct-in-go) | [উদাহরণ](#উদাহরণ-13) | -| ২১ | [What is an instance?](#২১-what-is-an-instance) | [উদাহরণ](#উদাহরণ-14) | -| ২২ | [What are member variables?](#২২-what-are-member-variables) | [উদাহরণ](#উদাহরণ-15) | -| ২৩ | [What is instantiation?](#২৩-what-is-instantiation) | [উদাহরণ](#উদাহরণ-16) | -| ২৪ | [What is the receiver function?](#২৪-what-is-the-receiver-function) | [উদাহরণ](#উদাহরণ-17) | -| ২৫ | [Difference between expression and statement](#২৫-difference-between-expression-and-statement) | [উদাহরণ](#উদাহরণ-18), [পার্থক্য সংক্ষেপে](#পার্থক্য-সংক্ষেপে) | -| ২৬ | [What is pointer? And difference between pass by value vs pass by reference](#২৬-what-is-pointer-and-difference-between-pass-by-value-vs-pass-by-reference) | [উদাহরণ](#উদাহরণ-19) | -| ২৭ | [Difference between pass by value vs pass by reference](#২৭-difference-between-pass-by-value-vs-pass-by-reference) | [উদাহরণ](#উদাহরণ-20), [উদাহরণ](#উদাহরণ-21), [পার্থক্য সংক্ষেপে](#পার্থক্য-সংক্ষেপে-1) | -| ২৮ | [Describe internal memory of a Go program](#২৮-describe-internal-memory-of-a-go-program) | [উদাহরণ](#উদাহরণ-22), [উদাহরণ](#উদাহরণ-23) | +| ৪ | [What is the standard or named function?](#what-is-the-standard-or-named-function) | [উদাহরণ](#উদাহরণ-1) | +| ৫ | [What is anonymous function?](#what-is-anonymous-function) | [উদাহরণ](#উদাহরণ-2) | +| ৬ | [What is expression?](#what-is-expression) | [উদাহরণ](#উদাহরণ-3) | +| ৭ | [What is function expression?](#what-is-function-expression) | [উদাহরণ](#উদাহরণ-4) | +| ৮ | [What is immediately invoked function expression (IIFE)?](#৮what-is-immediately-invoked-function-expression-iife) | [উদাহরণ](#উদাহরণ-5) | +| ৯ | [Difference between arguments and parameters](#difference-between-arguments-and-parameters) | [উদাহরণ](#উদাহরণ-6) | +| ১০ | [What is first-class function or higher-order function?](#what-is-first-class-function-or-higher-order-function) | [উদাহরণ](#উদাহরণ-7) | +| ১১ | [Difference between first-order function and higher-order function](#difference-between-first-order-function-and-higher-order-function) | | +| ১২ | [Difference between first-order logic and higher-order logic](#difference-between-first-order-logic-and-higher-order-logic) | | +| ১৩ | [What is callback function?](#what-is-callback-function) | [উদাহরণ](#উদাহরণ-8) | +| ১৪ | [What is the first-class citizen?](#what-is-the-first-class-citizen) | | +| ১৫ | [What is init function?](#what-is-init-function) | [উদাহরণ](#উদাহরণ-9) | +| ১৬ | [Difference between compile time and run time](#difference-between-compile-time-and-run-time) | [কম্পাইল টাইম](#কম্পাইল-টাইম-compile-time), [রান টাইম](#রান-টাইম-run-time) | +| ১৭ | [What is escape analysis?](#what-is-escape-analysis) | [উদাহরণ](#উদাহরণ-10) | +| ১৮ | [Describe 2 phases of running a Go program](#describe-2-phases-of-running-a-go-program) | [উদাহরণ](#উদাহরণ-11) | +| ১৯ | [What is closure in Go?](#what-is-closure-in-go) | [উদাহরণ](#উদাহরণ-12) | +| ২০ | [What is struct in Go?](#what-is-struct-in-go) | [উদাহরণ](#উদাহরণ-13) | +| ২১ | [What is an instance?](#what-is-an-instance) | [উদাহরণ](#উদাহরণ-14) | +| ২২ | [What are member variables?](#what-are-member-variables) | [উদাহরণ](#উদাহরণ-15) | +| ২৩ | [What is instantiation?](#what-is-instantiation) | [উদাহরণ](#উদাহরণ-16) | +| ২৪ | [What is the receiver function?](#what-is-the-receiver-function) | [উদাহরণ](#উদাহরণ-17) | +| ২৫ | [Difference between expression and statement](#difference-between-expression-and-statement) | [উদাহরণ](#উদাহরণ-18), [পার্থক্য সংক্ষেপে](#পার্থক্য-সংক্ষেপে) | +| ২৬ | [What is pointer? And difference between pass by value vs pass by reference](#what-is-pointer-and-difference-between-pass-by-value-vs-pass-by-reference) | [উদাহরণ](#উদাহরণ-19) | +| ২৭ | [Difference between pass by value vs pass by reference](#difference-between-pass-by-value-vs-pass-by-reference) | [উদাহরণ](#উদাহরণ-20), [উদাহরণ](#উদাহরণ-21), [পার্থক্য সংক্ষেপে](#পার্থক্য-সংক্ষেপে-1) | +| ২৮ | [Describe internal memory of a Go program](#describe-internal-memory-of-a-go-program) | [উদাহরণ](#উদাহরণ-22), [উদাহরণ](#উদাহরণ-23) | +---

১। What is scope?

@@ -127,6 +128,7 @@ func main() { ``` --- +

৫। What is anonymous function?

Anonymous Function বলতে এমন ফাংশনকে বোঝায় যার কোনো নাম থাকে না। এই ফাংশনগুলো সাধারণত তখনই ব্যবহার করা হয় যখন আমাদের ফাংশনটি শুধুমাত্র একটি নির্দিষ্ট জায়গায় ব্যবহার করার প্রয়োজন হয়, এবং এটিকে পুনরায় ব্যবহার করার দরকার হয় না। From e5c7b094c6e41d655d968a6d860c736b303ea9ce Mon Sep 17 00:00:00 2001 From: "Md. Fahim Bin Amin" Date: Tue, 25 Mar 2025 20:34:10 +0600 Subject: [PATCH 3/3] fix: TOC, hyperlink issue --- basic-questions.md | 116 ++++++++++++++++++++++----------------------- 1 file changed, 57 insertions(+), 59 deletions(-) diff --git a/basic-questions.md b/basic-questions.md index 90c7df7..d5ca1af 100644 --- a/basic-questions.md +++ b/basic-questions.md @@ -4,38 +4,38 @@ | # | প্রশ্ন | উদাহরণ | | --- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | -| ১ | [What is scope?](#what-is-scope) | [উদাহরণ](#উদাহরণ) | -| ২ | [What is block?](#what-is-block) | [উদাহরণ: (Nested Block Scope)](#উদাহরণ-nested-block-scope) | -| ৩ | [How many types of scopes are there in Golang?](#how-many-types-of-scopes-are-there-available-on-golang) | | -| ৪ | [What is the standard or named function?](#what-is-the-standard-or-named-function) | [উদাহরণ](#উদাহরণ-1) | -| ৫ | [What is anonymous function?](#what-is-anonymous-function) | [উদাহরণ](#উদাহরণ-2) | -| ৬ | [What is expression?](#what-is-expression) | [উদাহরণ](#উদাহরণ-3) | -| ৭ | [What is function expression?](#what-is-function-expression) | [উদাহরণ](#উদাহরণ-4) | -| ৮ | [What is immediately invoked function expression (IIFE)?](#৮what-is-immediately-invoked-function-expression-iife) | [উদাহরণ](#উদাহরণ-5) | -| ৯ | [Difference between arguments and parameters](#difference-between-arguments-and-parameters) | [উদাহরণ](#উদাহরণ-6) | -| ১০ | [What is first-class function or higher-order function?](#what-is-first-class-function-or-higher-order-function) | [উদাহরণ](#উদাহরণ-7) | -| ১১ | [Difference between first-order function and higher-order function](#difference-between-first-order-function-and-higher-order-function) | | -| ১২ | [Difference between first-order logic and higher-order logic](#difference-between-first-order-logic-and-higher-order-logic) | | -| ১৩ | [What is callback function?](#what-is-callback-function) | [উদাহরণ](#উদাহরণ-8) | -| ১৪ | [What is the first-class citizen?](#what-is-the-first-class-citizen) | | -| ১৫ | [What is init function?](#what-is-init-function) | [উদাহরণ](#উদাহরণ-9) | -| ১৬ | [Difference between compile time and run time](#difference-between-compile-time-and-run-time) | [কম্পাইল টাইম](#কম্পাইল-টাইম-compile-time), [রান টাইম](#রান-টাইম-run-time) | -| ১৭ | [What is escape analysis?](#what-is-escape-analysis) | [উদাহরণ](#উদাহরণ-10) | -| ১৮ | [Describe 2 phases of running a Go program](#describe-2-phases-of-running-a-go-program) | [উদাহরণ](#উদাহরণ-11) | -| ১৯ | [What is closure in Go?](#what-is-closure-in-go) | [উদাহরণ](#উদাহরণ-12) | -| ২০ | [What is struct in Go?](#what-is-struct-in-go) | [উদাহরণ](#উদাহরণ-13) | -| ২১ | [What is an instance?](#what-is-an-instance) | [উদাহরণ](#উদাহরণ-14) | -| ২২ | [What are member variables?](#what-are-member-variables) | [উদাহরণ](#উদাহরণ-15) | -| ২৩ | [What is instantiation?](#what-is-instantiation) | [উদাহরণ](#উদাহরণ-16) | -| ২৪ | [What is the receiver function?](#what-is-the-receiver-function) | [উদাহরণ](#উদাহরণ-17) | -| ২৫ | [Difference between expression and statement](#difference-between-expression-and-statement) | [উদাহরণ](#উদাহরণ-18), [পার্থক্য সংক্ষেপে](#পার্থক্য-সংক্ষেপে) | -| ২৬ | [What is pointer? And difference between pass by value vs pass by reference](#what-is-pointer-and-difference-between-pass-by-value-vs-pass-by-reference) | [উদাহরণ](#উদাহরণ-19) | -| ২৭ | [Difference between pass by value vs pass by reference](#difference-between-pass-by-value-vs-pass-by-reference) | [উদাহরণ](#উদাহরণ-20), [উদাহরণ](#উদাহরণ-21), [পার্থক্য সংক্ষেপে](#পার্থক্য-সংক্ষেপে-1) | -| ২৮ | [Describe internal memory of a Go program](#describe-internal-memory-of-a-go-program) | [উদাহরণ](#উদাহরণ-22), [উদাহরণ](#উদাহরণ-23) | +| ১ | [What is scope?](#১-what-is-scope) | [উদাহরণ](#উদাহরণ) | +| ২ | [What is block?](#২-what-is-block) | [উদাহরণ: (Nested Block Scope)](#উদাহরণ-nested-block-scope) | +| ৩ | [How many types of scopes are there in Golang?](#৩-how-many-types-of-scopes-are-there-available-on-golang) | | +| ৪ | [What is the standard or named function?](#৪-what-is-the-standard-or-named-function) | [উদাহরণ](#উদাহরণ-1) | +| ৫ | [What is anonymous function?](#৫-what-is-anonymous-function) | [উদাহরণ](#উদাহরণ-2) | +| ৬ | [What is expression?](#৬-what-is-expression) | [উদাহরণ](#উদাহরণ-3) | +| ৭ | [What is function expression?](#৭-what-is-function-expression) | [উদাহরণ](#উদাহরণ-4) | +| ৮ | [What is immediately invoked function expression (IIFE)?](#৮-what-is-immediately-invoked-function-expression-iife) | [উদাহরণ](#উদাহরণ-5) | +| ৯ | [Difference between arguments and parameters](#৯-difference-between-arguments-and-parameters) | [উদাহরণ](#উদাহরণ-6) | +| ১০ | [What is first-class function or higher-order function?](#১০-what-is-first-class-function-or-higher-order-function) | [উদাহরণ](#উদাহরণ-7) | +| ১১ | [Difference between first-order function and higher-order function](#১১-difference-between-first-order-function-and-higher-order-function) | | +| ১২ | [Difference between first-order logic and higher-order logic](#১২-difference-between-first-order-logic-and-higher-order-logic) | | +| ১৩ | [What is callback function?](#১৩-what-is-callback-function) | [উদাহরণ](#উদাহরণ-8) | +| ১৪ | [What is the first-class citizen?](#১৪-what-is-the-first-class-citizen) | | +| ১৫ | [What is init function?](#১৫-what-is-init-function) | [উদাহরণ](#উদাহরণ-9) | +| ১৬ | [Difference between compile time and run time](#১৬-difference-between-compile-time-and-run-time) | [কম্পাইল টাইম](#কম্পাইল-টাইম-compile-time), [রান টাইম](#রান-টাইম-run-time) | +| ১৭ | [What is escape analysis?](#১৭-what-is-escape-analysis) | [উদাহরণ](#উদাহরণ-10) | +| ১৮ | [Describe 2 phases of running a Go program](#১৮-describe-2-phases-of-running-a-go-program) | [উদাহরণ](#উদাহরণ-11) | +| ১৯ | [What is closure in Go?](#১৯-what-is-closure-in-go) | [উদাহরণ](#উদাহরণ-12) | +| ২০ | [What is struct in Go?](#২০-what-is-struct-in-go) | [উদাহরণ](#উদাহরণ-13) | +| ২১ | [What is an instance?](#২১-what-is-an-instance) | [উদাহরণ](#উদাহরণ-14) | +| ২২ | [What are member variables?](#২২-what-are-member-variables) | [উদাহরণ](#উদাহরণ-15) | +| ২৩ | [What is instantiation?](#২৩-what-is-instantiation) | [উদাহরণ](#উদাহরণ-16) | +| ২৪ | [What is the receiver function?](#২৪-what-is-the-receiver-function) | [উদাহরণ](#উদাহরণ-17) | +| ২৫ | [Difference between expression and statement](#২৫-difference-between-expression-and-statement) | [উদাহরণ](#উদাহরণ-18), [পার্থক্য সংক্ষেপে](#পার্থক্য-সংক্ষেপে) | +| ২৬ | [What is pointer? And difference between pass by value vs pass by reference](#২৬-what-is-pointer-and-difference-between-pass-by-value-vs-pass-by-reference) | [উদাহরণ](#উদাহরণ-19) | +| ২৭ | [Difference between pass by value vs pass by reference](#২৭-difference-between-pass-by-value-vs-pass-by-reference) | [উদাহরণ](#উদাহরণ-20), [উদাহরণ](#উদাহরণ-21), [পার্থক্য সংক্ষেপে](#পার্থক্য-সংক্ষেপে-1) | +| ২৮ | [Describe internal memory of a Go program](#২৮-describe-internal-memory-of-a-go-program) | [উদাহরণ](#উদাহরণ-22), [উদাহরণ](#উদাহরণ-23) | --- -

১। What is scope?

+## ১. What is scope? স্কোপ হলো একটি নির্দিষ্ট অংশ যেখানে কোনো ভেরিয়েবল বা ফাংশনকে অ্যাক্সেস বা ব্যবহার করা যায়। @@ -71,7 +71,7 @@ func anotherFunction() { --- -

২। What is block?

+## ২. What is block? Block বলতে একটি নির্দিষ্ট অঞ্চল বা সীমানা বোঝায়, যা `{}` দ্বারা আবদ্ধ থাকে। এই ব্লকের মধ্যে যেকোনো কোড লেখা হয় এবং তা একটি নির্দিষ্ট স্কোপ (Scope) তৈরি করে। ব্লকের ভিতরে ডিক্লেয়ার করা ভেরিয়েবল বা ফাংশন শুধুমাত্র ঐ ব্লকের মধ্যেই অ্যাক্সেসযোগ্য হয়। @@ -90,7 +90,7 @@ func nestedBlockExample() { --- -

৩। How many types of scopes are there available on Golang?

+## ৩. How many types of scopes are there available on Golang? 1. **Global scope** - পুরো প্রোগ্রামে অ্যাক্সেসযোগ্য। 2. **Local scope** - শুধুমাত্র নির্দিষ্ট ব্লকের ভিতরে অ্যাক্সেসযোগ্য। @@ -98,7 +98,7 @@ func nestedBlockExample() { --- -

৪। What is the standard or named function?

+## ৪. What is the standard or named function? Standard বা Named Function হলো এমন একটি ফাংশন যার একটি নির্দিষ্ট নাম থাকে। ফাংশন কল করার জন্য এই নামটি ব্যবহার করা হয়। @@ -129,7 +129,7 @@ func main() { --- -

৫। What is anonymous function?

+## ৫. What is anonymous function? Anonymous Function বলতে এমন ফাংশনকে বোঝায় যার কোনো নাম থাকে না। এই ফাংশনগুলো সাধারণত তখনই ব্যবহার করা হয় যখন আমাদের ফাংশনটি শুধুমাত্র একটি নির্দিষ্ট জায়গায় ব্যবহার করার প্রয়োজন হয়, এবং এটিকে পুনরায় ব্যবহার করার দরকার হয় না। @@ -149,7 +149,7 @@ func main() { --- -

৬। What is expression?

+## ৬. What is expression? Expression হলো প্রোগ্রামিং-এ এমন একটি কোডের অংশ যা কোনো নির্দিষ্ট মান (value) তৈরি করে। অন্য কথায়, যখন কোনো কোড একটি ফলাফল বা আউটপুট দেয়, তখন সেই কোডকে এক্সপ্রেশন বলা হয়। @@ -167,7 +167,7 @@ result := add(4, 6) // এটি একটি ফাংশন কল এক্ --- -

৭। What is function expression?

+## ৭. What is function expression? ফাংশন এক্সপ্রেশন (Function Expression) বলতে এমন একটি ফাংশনকে বোঝায় যা একটি ভেরিয়েবলের মধ্যে স্টোর করা হয়। @@ -189,7 +189,7 @@ func main() { --- -

৮। What is immediately invoked function expression (IIFE)?

+## ৮. What is immediately invoked function expression (IIFE)? IIFE - Immediately Invoked Function Expression বলতে এমন একটি ফাংশনকে বোঝায় যা ডিক্লেয়ার করার সাথে সাথে তৎক্ষণাৎ কল করা হয়। অন্য কথায়, এটি একটি ফাংশন যা প্রোগ্রামে লেখার সময়ই এক্সিকিউট হয়ে যায়। এই ফাংশনটি শুধুমাত্র একবার ব্যবহার করা হয়, এবং পরে এটি পুনরায় কল করা যায় না। @@ -208,7 +208,7 @@ func main() { --- -

৯। Difference between arguments and parameters

+## ৯. Difference between arguments and parameters **Parameter:** প্যারামিটার হল ফাংশন ডিফাইন করার সময় যে ভেরিয়েবলগুলো ব্যবহার করা হয়। এগুলো মূলত ফাংশনের জন্য একটা প্লেসহোল্ডার হিসেবে কাজ করে। @@ -226,7 +226,7 @@ result := add(3, 5) // 3 এবং 5 হল আর্গুমেন্ট --- -

১০। What is first-class function or higher-order function?

+## ১০. What is first-class function or higher-order function? Higher-order function বলতে এমন ফাংশনকে বোঝায় যা অন্য ভেরিয়েবলের মতোই ব্যবহার করা যায়। অন্য কথায় ফাংশনটি একটি ভেরিয়েবলে স্টোর করা যায়, যে ফাংশন প্যারামিটারের ইনপুট হিসেবে আরেকটা ফানশনকে রিসিভ করতে পারে এবং অন্য ফাংশন থেকে রিটার্ন করা যায়। @@ -270,7 +270,7 @@ func main() { --- -

১১। Difference between first-order function and higher-order function

+## ১১. Difference between first-order function and higher-order function **First-Order Function:** ফার্স্ট অর্ডার ফাংশন হলো এমন ফাংশন যা অন্য কোনো ফাংশনকে প্যারামিটার হিসেবে গ্রহণ করে না এবং অন্য কোনো ফাংশনকে রিটার্নও করে না। এটি শুধুমাত্র নরমাল ডেটা (যেমন: সংখ্যা, স্ট্রিং, অ্যারে ইত্যাদি) নিয়ে কাজ করে। @@ -280,7 +280,7 @@ func main() { --- -

১২। Difference between first order logic and higher order logic

+## ১২. Difference between first order logic and higher order logic **First Order Logic:** First-Order Logic হলো এমন একটি লজিক সিস্টেম যা শুধুমাত্র Object, Property, Relation নিয়ে কাজ করে। @@ -298,7 +298,7 @@ Higher-Order Logic এমন একটি লজিক সিস্টেম য --- -

১৩। What is callback function?

+## ১৩. What is callback function? Callback Function হলো এমন একটি ফাংশন যা অন্য একটি ফাংশনের ভিতরে প্যারামিটার হিসেবে পাঠানো হয় এবং প্রথম ফাংশনটি যখন প্রয়োজন হয়, তখন এই কলব্যাক ফাংশনটিকে কল করে। অন্য কথায়, কলব্যাক ফাংশন হলো এমন একটি ফাংশন যা অন্য ফাংশনের দ্বারা "কল করার" জন্য পাঠানো হয়। @@ -334,13 +334,13 @@ func main() { --- -

১৪। What is the first-class citizen?

+### ১৪. What is the first-class citizen? First-Class Citizen বলতে বোঝায় যা প্রোগ্রামের মধ্যে অন্য যেকোনো ডেটা টাইপের মতোই ব্যবহার করা যায়। GO-তে ফাংশন হলো ফার্স্ট ক্লাস সিটিজেন, কারণ ফাংশনকে ভেরিয়েবলে স্টোর করা, প্যারামিটার হিসেবে পাঠানো, অথবা অন্য ফাংশন থেকে রিটার্ন করা যায়। --- -

১৫। What is init function?

+### ১৫. What is init function? **init ফাংশন** হলো একটি বিশেষ ফাংশন যা কোনো প্যাকেজ বা ফাইল লোড হওয়ার সময় অটোমেটিকভাবে একবার কল হয়। এটি প্রোগ্রামের প্রাথমিক সেটআপ বা ইনিশিয়ালাইজেশন কাজে ব্যবহৃত হয়, যেমন: ভেরিয়েবল ইনিশিয়ালাইজ করা, ডাটাবেস কানেকশন তৈরি করা, কনফিগারেশন লোড করা ইত্যাদি। @@ -376,7 +376,7 @@ Main function --- -

১৬। Difference between compile time and run time

+### ১৬. Difference between compile time and run time #### **কম্পাইল টাইম (Compile Time):** @@ -396,7 +396,7 @@ Main function --- -

১৭। What is escape analysis?

+### ১৭. What is escape analysis? Escape Analysis হলো গো (Go) প্রোগ্রামিং-এর একটি অপটিমাইজেশন টুল বা প্রক্রিয়া, যা কম্পাইলার দ্বারা ব্যবহৃত হয়। এটি ডিসাইড করে যে কোনো ভেরিয়েবল বা ডেটা ফাংশনের বাইরে ব্যবহার হতে পারে কিনা । এই বিশ্লেষণের উপর ভিত্তি করে কম্পাইলার ডিসাইড করে যে ভেরিয়েবলটি মেমোরির স্ট্যাক (Stack) নাকি হিপ (Heap) - এ store করা হবে। @@ -424,7 +424,7 @@ fmt.Println(*p) --- -

১৮। Describe 2 phases of running a Go program

+### ১৮. Describe 2 phases of running a Go program **১। In the Compilation Phase:** এই Phase এ GO কম্পাইলার সোর্স কোডকে মেশিন কোডে (Executable Binary Code) রূপান্তর করে ও সিনট্যাক্স এবং টাইপ চেকিং করে। @@ -439,7 +439,7 @@ go build main.go # Compilation Phase (creates an executable) --- -

১৯। What is closure in Go?

+### ১৯. What is closure in Go? ক্লোজার(closure) হলো এমন একটি ফাংশন যা তার নিজের স্কোপের বাইরের ভেরিয়েবলগুলোকে "মনে রাখে" এমনকি বাইরের ফাংশনের execution শেষ হবার পরেও এবং সেগুলোকে ব্যবহার করতে পারে। @@ -471,7 +471,7 @@ func main() { --- -

২০। What is struct in Go?

+### ২০. What is struct in Go? **Struct** হলো গো (Go) প্রোগ্রামিং-এর একটি গুরুত্বপূর্ণ ডেটা স্ট্রাকচার। এটি একটি কাস্টম ডেটা টাইপ যা বিভিন্ন ধরনের ডেটা ফিল্ড (ভেরিয়েবল) একত্রে গ্রুপ করে রাখতে ব্যবহৃত হয়। স্ট্রাক্ট ব্যবহার করে আমরা একটি একক ইউনিটে বিভিন্ন ধরনের ডেটা (যেমন: স্ট্রিং, ইন্টিজার, বুলিয়ান ইত্যাদি) সংরক্ষণ করতে পারি। @@ -497,7 +497,7 @@ func main() { --- -

২১। What is an instance?

+### ২১. What is an instance? **Instance** হলো যখন আমরা একটি struct বা কোনো কাস্টম ডেটা টাইপের জন্য একটি ভেরিয়েবল তৈরি করি, তখন সেই ভেরিয়েবলটিকে ওই ডেটা টাইপের একটি ইনস্ট্যান্স বলা হয়। @@ -535,7 +535,7 @@ p1 এবং p2 হলো Person স্ট্রাক্টের দুটি --- -

২২। What are member variables?

+### ২২. What are member variables? Go প্রোগ্রামিং ভাষায় মেম্বার ভেরিয়েবল হল সেই সকল ভেরিয়েবল যা একটি Struct এর ভিতরে Define করা হয়। এগুলিকে আমরা 'ফিল্ড' (Fields) হিসেবেও উল্লেখ করি। স্ট্রাক্টের মেম্বার ভেরিয়েবলগুলি যেকোনো ডাটা টাইপের হতে পারে, যেমন: @@ -570,7 +570,7 @@ type কর্মচারী struct { --- -

২৩। What is instantiation?

+### ২৩. What is instantiation? **Instantiation** হলো একটি ডেটা টাইপের জন্য একটি ইনস্ট্যান্স তৈরি করার পদ্ধতি। @@ -608,7 +608,7 @@ p1 এবং p2 হলো Person স্ট্রাক্টের দুটি --- -

২৪। What is the receiver function?

+### ২৪. What is the receiver function? Go ভাষায় "receiver function" হল একটি মেথড যেটি একটি নির্দিষ্ট টাইপের সাথে যুক্ত থাকে। এই মেথডগুলি একটি স্ট্রাক্ট (struct) বা অন্য কোনো টাইপের উপর অপারেশন সম্পাদন করতে ব্যবহৃত হয়। রিসিভার ফাংশন ডিফাইন করার সময় ফাংশনের নামের আগে একটি রিসিভার প্যারামিটার যোগ করা হয়, যা নির্দেশ করে যে এই মেথডটি কোন টাইপের সাথে যুক্ত। @@ -636,7 +636,7 @@ func main() { --- -

২৫। Difference between expression and statement

+### ২৫. Difference between expression and statement **Expression (এক্সপ্রেশন):** Expression হল এমন একটি কোড অংশ যা একটি মান (value) তৈরি করে। এটি একটি ভ্যারিয়েবল, কনস্ট্যান্ট, অপারেটর, বা ফাংশন কলের সমন্বয়ে গঠিত হতে পারে। প্রতিটি এক্সপ্রেশন একটি নির্দিষ্ট মানে রূপান্তরিত হয়, যেমন: সংখ্যা, স্ট্রিং, বুলিয়ান ইত্যাদি। @@ -674,7 +674,7 @@ func main() { --- -

২৬। what is pointer? And difference between pass by value vs pass by reference

+### ২৬. what is pointer? And difference between pass by value vs pass by reference **Pointer:** Pointer হলো একটি ভেরিয়েবল যা অন্য একটি ভেরিয়েবলের মেমোরি অ্যাড্রেস স্টোর করে। সহজ কথায়, পয়েন্টার আমাদের বলে দেয় যে, কোনো ডেটা মেমরির কোন স্থানে আছে, এবং আমরা সেই স্থানে গিয়ে ডেটার সাথে কাজ করতে পারি। @@ -699,9 +699,7 @@ func main() { **বিঃদ্রঃ** এখানে p হল পয়েন্টার এবং \*p দিয়ে আমরা x এর মান অ্যাক্সেস করতে পারি। ---- - -

২৭। Difference between pass by value vs pass by reference

+### ২৭. Difference between pass by value vs pass by reference **Pass by value:** যখন আমরা একটি ফাংশনে কোনো আর্গুমেন্ট পাস বাই ভ্যালু হিসেবে পাঠাই, তখন সেই আর্গুমেন্টের একটি কপি তৈরি হয় এবং ফাংশন সেই কপি নিয়ে কাজ করে। ফাংশনের ভিতরে কপির মান পরিবর্তন হলেও মূল ভেরিয়েবলের মান অপরিবর্তিত থাকে। @@ -756,7 +754,7 @@ func main() { --- -

২৮। Describe internal memory of a Go program

+### ২৮. Describe internal memory of a Go program Go প্রোগ্রাম রান হইলে প্রথমেই র‍্যামের কিছু অংশ অর্থাৎ মেমোরি ব্লক দখল করে ফেলে, প্রথম যে অংশ দখল করে সেটা Code Segment তারপর যে অংশ দখল করে সেটা Data segment এরপর Stack ও Heap নামে আরো ২ টা অংশ দখল করে। @@ -798,4 +796,4 @@ func createUser() *User { --- -এই ডকুমেন্টের মাধ্যমে আপনি Go প্রোগ্রামিং ভাষার গুরুত্বপূর্ণ প্রশ্নোত্তর সম্পর্কে জানতে পারবেন, যা আপনার ইন্টারভিউ প্রস্তুতিতে সহায়ক হবে। +এই ডকুমেন্টের মাধ্যমে আপনি Go প্রোগ্রামিং ভাষার গুরুত্বপূর্ণ প্রশ্নোত্তর সম্পর্কে জানতে পারবেন, যা আপনার ইন্টারভিউ প্রস্তুতিতে সহায়ক হবে। \ No newline at end of file