8.3 WRITING OUR FIRST C PROGRAM

8.3 আমাৰ প্ৰথম চি প্ৰ’গ্ৰাম লিখা

In this book, we will see writing C programs using an IDE namely Codeblock. If the IDE is not installed on your computer, you need to first download and install it (steps 1 and 2). We will follow step 3 onwards to write our C programs.

এই কিতাপখনত, আমি কোডব্লক নামৰ এটা আইডিই ব্যৱহাৰ কৰি চি প্ৰ’গ্ৰাম লিখা দেখিম। যদি আপোনাৰ কম্পিউটাৰত আইডিই ইনষ্টল কৰা নহয়, আপুনি প্ৰথমে ইয়াক ডাউনলোড আৰু ইনষ্টল কৰিব লাগিব (পদক্ষেপ 1 আৰু 2)। আমি আমাৰ চি প্ৰ’গ্ৰামবোৰ লিখিবলৈ পদক্ষেপ 3 ৰ পৰা অনুসৰণ কৰিম।

1. Go to the website of codeblock: http://www.codeblocks.org/downloads.

কোডব্লকৰ ৱেবছাইটলৈ যাওক: http://www.codeblocks.org/downloads।

2. Download the version that suits your computer and install it. If you do not have any C compiler installed on your computer, then you may download codeblock with mingw setup file (refer Figure 8.2).

আপোনাৰ কম্পিউটাৰৰ সৈতে খাপ খোৱা সংস্কৰণটো ডাউনলোড কৰক আৰু ইয়াক ইনষ্টল কৰক। যদি আপোনাৰ কম্পিউটাৰত কোনো চি কম্পাইলাৰ ইনষ্টল কৰা নাই, তেন্তে আপুনি মিংৱ ছেটআপ ফাইলৰ সৈতে কোডব্লক ডাউনলোড কৰিব পাৰে (চিত্ৰ 8.2 চাওক)।

3. Open the Codeblock software on your computer.

3 আপোনাৰ কম্পিউটাৰত কোডব্লক ছফ্টৱেৰখোলক।

4. Create an empty file by clicking menu items: File → New → Empty file (Figure 8.3)

মেনু আইটেমসমূহ ক্লিক কৰি এটা খালী ফাইল সৃষ্টি কৰক: ফাইল → নতুন → খালী ফাইল (চিত্ৰ 8.3)

5. Then you may start writing the code.

তেতিয়া আপুনি কোডটো লিখিবলৈ আৰম্ভ কৰিব পাৰে।

6. Save the file using any filename with an extension of .c (Figure 8.4).

6 সম্প্ৰসাৰণৰ সৈতে যিকোনো ফাইলনাম ব্যৱহাৰ কৰি ফাইলটো সংৰক্ষণ কৰক (চিত্ৰ 8.4)।

7. After you complete writing the program, you save the file by pressing Ctrl+S or clicking File Save file.

আপুনি প্ৰ’গ্ৰামটো লিখা সম্পূৰ্ণ কৰাৰ পিছত, আপুনি চিটিআৰএল+এছ টিপি বা ফাইল চেভ ফাইলক্লিক কৰি ফাইলটো সংৰক্ষণ কৰক।

8. Run the program by pressing F9 or clicking menu items Build → Build and run.

এফ 9 টিপি বা মেনু আইটেমত ক্লিক কৰি প্ৰ’গ্ৰামটো চলাওক বিল্ড → বিল্ড এণ্ড ৰান।

9. In case there is no error in the code and the program successfully builds, you will see an output window with the intended output (Figure 8.5).

যদি কোডত কোনো ত্ৰুটি নাথাকে আৰু প্ৰ’গ্ৰামটো সফলতাৰে নিৰ্মাণ হয়, আপুনি অভিপ্ৰেত আউটপুটৰ সৈতে এটা আউটপুট উইণ্ডো দেখিব (চিত্ৰ 8.5)।

10. If there is any error in the program you wrote, you will see on the build message panel You may also install any other IDE or any other compiler. Alternatively, you may also use an online compiler as mentioned before. This will not affect the learning of C programming.

আপুনি লিখা প্ৰ’গ্ৰামটোত কোনো ত্ৰুটি থাকিলে, আপুনি বিল্ড মেচেজ পেনেলত দেখিব আপুনি আন যিকোনো আইডিই বা আন যিকোনো কম্পাইলাৰ ইনষ্টল কৰিব পাৰে। বৈকল্পিকভাৱে, আপুনি আগতে উল্লেখ কৰা অনুসৰি অনলাইন কম্পাইলাৰ এটাও ব্যৱহাৰ কৰিব পাৰে। ই চি প্ৰ’গ্ৰামিং শিকাত প্ৰভাৱ পেলাব নোৱাৰে।