العودة إلى  مدرسة الكمبيوتر   قسم البرمجة    الصفحة الأولى

Postfix Increment and Decrement Operators:  ++, --

postfix-expression :

postfix-expression ++
postfix-expression
--

Operands of the postfix increment and decrement operators are scalar types that are modifiable l-values.

The result of the postfix increment or decrement operation is the value of the postfix-expression before the increment or decrement operator is applied. The type of the result is the same as that of the postfix-expression but is no longer an l-value. After the result is obtained, the value of the operand is incremented (or decremented).

Example

In the following example, the for loop is iterated 10 times. After each iteration, the nCount variable increased by +1 using the postfix increment operator.

// Example of the postfix increment operator

for (nCount = 0; nCount < 10; nCount++) {

   nTotal += nArray[Count];

}

 

 طباعة المقال العودة إلى  مدرسة الكمبيوتر   قسم البرمجة    الصفحة الأولى
Syria
سورية
Amrit
عمريت
أرواد
طرطوس
صور من طرطوس
صور من سورية
للسيدات فقط
معجم الكمبيوتر
أدب وفكر
المجلة الطبية
المعلومات العامة
لمحة عن طرطوس
الموضة النسائية
مدرسة الكمبيوتر
 © 2002-2012 LBCInformation Corporation. All rights reserved م حنا عطا لحود.