Home / Programs / Pointer ব্যবহার করে ছোট সংখ্যা নির্ণয়
🚀 Programming Example

Pointer ব্যবহার করে ছোট সংখ্যা নির্ণয়

👁 0 Views
💻 Practical Program
📘 Step Learning
Learn this program step-by-step with algorithm, source code, output and detailed explanation.

📌 Information & Algorithm

  1. দুটি সংখ্যা ইনপুট নিন।
  2. Pointer ব্যবহার করে সংখ্যা দুটি access করুন।
  3. ছোট সংখ্যা নির্ণয় করুন।
  4. ফলাফল প্রিন্ট করুন।

💻 Program Code

#include <stdio.h>

int main()
{
    int a = 15, b = 25;

    int *p1, *p2;

    p1 = &a;
    p2 = &b;

    if(*p1 < *p2)
    {
        printf("Smaller Number = %d", *p1);
    }
    else
    {
        printf("Smaller Number = %d", *p2);
    }

    return 0;
}
                        

🖥 Program Output

Smaller Number = 15
                            

📘 Explanation

Pointer ব্যবহার করে দুটি সংখ্যার মান তুলনা করা হয়েছে এবং ছোট সংখ্যাটি প্রিন্ট করা হয়েছে।

📚 Learning Subject

Master Programming Through Practical Examples

Improve your coding logic, problem-solving skills and programming confidence by practicing real-world examples with explanations.

🎯 How to learn from this example

First understand the algorithm carefully. Then study the program line-by-line and compare it with the output. Finally, review the explanation section to strengthen your logic and programming understanding.

🔥 Practice suggestion

Rewrite the program without looking at the code. Modify values, conditions or logic and run it again. This helps improve confidence and strengthens coding skills much faster.