#includeC allows two very useful operators not generally found in other languages. These are the increment and decrement operators: ++ and --main() { int count = 0, loop; loop = ++count; /* same as count = count + 1; loop = count; */ printf("loop = %d, count = %d\n", loop, count); loop = count++; /* same as loop = count; count = count + 1; */ printf("loop = %d, count = %d\n", loop, count); }
1. ++ variable name 2. variable name++ 3. --variable name 4. variable name--The increment operator ++ adds the value 1 to the current value of operand and the decrement operator -- subtracts the value 1 from the current value of operand.
#include 'stdio.h' #include 'conio.h' main() ession is true. Example : a > b && x == 10
#include'stdio.h' void main() { int i; printf ("value of i"); scanf ("%d",&i); (i>0)?printf("positive"):printf("negative"); }