C প্রোগ্রাম এর প্রয়োজনীয় উপকরন

Submitted by tushar pramanick on Mon, 01/02/2012 - 14:27

C Programs এর প্রয়োজনীয় উপকরন

এই অধ্যায়ে আমরা শিখবো সি প্রোগ্রামিং এর জন্য কিছু প্রয়োজনীয় জিনিস । যেমন

  • Constants and variables
  • Expressions
  • Statements
  • Statement blocks
  • C function types and names
  • Arguments to functions
  • The body of a function
  • Function calls

The Basics of the C Program

 ইট দিয়ে যেমন ভাবে বিল্ডিং তৈরি করা হয় তেমনভাবে সি প্রোগ্রামিং লিখতে গেলে কিছু প্রয়োজনীয়  জিনিসের দরকার হয় যেমন
 expressions, statements, statement blocks, and function blocks ইত্যাদি.

এই সমস্ত জিনিস গুলো পরে আলোচনা করা হবে কিন্তু প্রথমে জানতে হবে দুটি ছোট জিনিস যা অত্যন্ত প্রয়োজনীয় । সেগুলি হল  constant এবং variables.

 

Summary

In this Chapter you've learned the following:

  • A constant in C is a value that never changes. A variable, on the other hand, can present different values.
  • A combination of constants, variables, and operators is called an expression in the C language. An expression is used to denote different computations.
  • The arithmetic operators include +, -, *, /, and %.
  • A statement consists of a complete expression suffixed with a semicolon.
  • The C compiler treats a statement block as a single statement, although the statement block may contain more than one statement.
  • The function type of a function determines the type of the return value made by the function.
  • You have to follow certain rules to make a valid function name.
  • An argument contains information that you want to pass to a function. An argument list contains two or more arguments that are separated by commas.
  • The opening brace ({) and closing brace (}) are used to mark the start and end of a C function.
  • A function body contains variable declarations and statements. Usually, a function should accomplish just one task.

In the next lesson you'll learn more about data types in the C language.

 

Comments

Related Items

Adding More Expressions into for

Adding More Expressions into for

The C language allows you to put more expressions into the three expression fields in the for statement. Expressions in a single expression field are separated by commas.

The Null Statement

The Null Statement

Looping Under the for Statement

Looping Under the for Statement

The general form of the for statement is

for (expression1; expression2; expression3) {
   statement1;
   statement2;
   .
   .
   .
}

Using Nested Loops

Using Nested Loops

You can put a loop inside another one to make nested loops. The computer will run the inner loop first before it resumes the looping for the outer loop.

Listing 7.7 is an example of how nested loops work.

 

The do-while Loop

The do-while Loop

You may note that in the for and while statements, the expressions are set at the top of the loop. However, in this section, you're going to see another statement used for looping,