/* all increment and decrement operators in C ( ++ , -- ) */
#include <stdio.h>
void main()
{
int a = 21;
int c ;
c = a++;
printf("Line 1 - Value of c is %d\n", c );
c = a--;
printf("Line 2 - Value of c is %d\n", c );
}
output :
Line 1 - Value of c is 22
Line 2 - Value of c is 20
No comments:
Post a Comment
smhjifrivly@gmail.com