c language in telugu videos
The increment operator ++ adds 1 to its operand, and the decrement operator — subtracts 1 from its operand. Thus:
Increment and Decrement operators
Increment operators (++)
Increment operators are increase the value of subsequent. value may be increase according to the programmer.
Increment operator are two types as follows :
Post increment
Pre increment
Decrement operators ( — )
decrement operators decrease the value to one, two and so on.
As like Increment operators, decrement operators are also two type as :
Post decrement
Pre decrement
Before we more discuss about increment and decrement operator, let understand some expression; that’s are using in all operators.
Now some issues of pre and post increment and decrement, we will discuss after solve following programming :
x = 5 x = 5 x = 5
x = x+1 ++x x++
x = 6 x = 6 x=5
In above program u notice that value of x increase to one in all three expression but after the increasing one, the final value of x in not same, third box result is differ to another two boxes. Now you know that c operators are mostly three types, ++ and — operators are Unary operators.
Post increment or decrement are lowest precedence so it is solve at the end of program. Hence above program in third box first value of x is print i.e. 5 after, it is increase.
More Stories
Notice: Trying to access array offset on value of type bool in /hermes/bosnacweb05/bosnacweb05bi/b2282/ipg.jbbuidtech37209/timecomputers/wp-content/themes/enternews/inc/template-functions.php on line 601
C tutorial in telugu about Strings Part 36
Notice: Trying to access array offset on value of type bool in /hermes/bosnacweb05/bosnacweb05bi/b2282/ipg.jbbuidtech37209/timecomputers/wp-content/themes/enternews/inc/template-functions.php on line 601
C language tutorial in telugu free download Part 35
Notice: Trying to access array offset on value of type bool in /hermes/bosnacweb05/bosnacweb05bi/b2282/ipg.jbbuidtech37209/timecomputers/wp-content/themes/enternews/inc/template-functions.php on line 601
How to learn c programming in telugu Strings example2 part 34